Introduction
My Diary
Contact

Stop Ants Dancing

In order to stop the ants dancing when they encounter an obstacle, the movement algorithm now randomly selects one of the free squares for the ant to move to. This results in a more natural movement of the ants as before it was a pong-like movement with the ants just bouncing off.

In the actual implementation of this the ants can't even consider the obstacle squares, they are only given the free squares to choose a new position.

Figure 1 - The ant would randomly choose either grid square 2, 3, 4, 5, or 6.

Last Modified: Dec 2nd, 2006 at 21:20:32
Created: Dec 2nd, 2006 at 21:20:32