@elad,
When you speak of slugs "changing their mind" about the directions in which they move, it sounds as though you're equating how humans might change their minds when they go for a walk. A slug decisions about where and when it moves might be very basic - far more basic than you might be considering.
Maybe it changes its pathway because it senses it's easier to move in a certain direction...path of lesser resistance. After all, it has to lay down a trail of mucus to lubricate its pathway.
For example, how and where and when it moves might be influenced by an attraction to heat, light, smells, or just random stimulus. If it has a very short attention span, who knows how long its memory retention is?
Slugs
"Basically, slugs are gastropods without shells. However, there may be either an external vestigial shell or an internal shell present in some species. Slugs have been evolved from snails but, they are evolutionarily different among themselves. There are about 60 species those are most commonly inhabit sea and fresh waters. Those who live in land are more susceptible for desiccation hence, they inhabit damp or moist environments more often than not.
Slugs have two pairs of tentacles those responsible for smell and vision. The muscular foot has more mucus secreting cells to prevent the foot being irritated from walking over rough land, and as a result, a trace of their route is left after they have walked. Rhythmic muscular movements in the foot cause them to move and overall speed of walking is very low, causing sluggish movements. They eat dead leaves and fungus, making them detritus-vores. Slugs have many natural enemies viz. amphibians, reptiles, birds, mammals, and fish. Their slimy body acts as an adaptation against the predators."
Read more: http://www.differencebetween.com/difference-between-slugs-and-vs-snails/#ixzz3Az4x2JO4