Here, we describe the special sequence that is run at the beginning
of our program. We build the keeper structure that is used
later to provide a safe place to drop food (and maybe even catch a
few enemy ants). Furthermore, we set up initial home markers
identifying the path toward the keeper. Last but not least, we divide
the ants into different groups that start the exploration of the map
in different directions.
The ants are, represented by triangles, are all facing right on the
anthill, which is indicated by having a darker background.
In the first two steps, all ants are turning to face to the upper
left. If we build our keeper structure from the upper left, time
can be used more efficiently, because ants with lower id (i.e., those
in the upper left) have precedence over ants with higher id. Some
signals can thus be passed in one step instead of two.
Using their senses, the ants detect where in the hill they are positioned.
After seven steps, the upper left ant has detected its status and begun
to turn. The three surrounding ants also know who they are and use markers
to signal the ants behind them where they are. The markers are represented
by lines on the field. During startup, markers are used for special purposes
-- usually though, they encode absolute directions pointing toward home
or food.
The head of the group leaves the hill first, to mark the fields immediately
surrounding the top and upper left of the home. Later, ants will follow home
markers, and it is important that they do not get blocked on the wrong side
of the keeper. Therefore, we make sure at the beginning that those markers
point away from the keeper, around the anthill.
The anthill is slowly split into different regions. Each region of ants
starts in a common direction, thereby leaving home pointers on the fields
of the anthill in such a way that they will guide incoming ants with food
to the entrance of the keeper structure.
The field with the dot, right below the upper left field of the anthill,
is the point where food will be dropped. This field uses a special marker
to signal its status to incoming ants (the marker is not shown, though;
the dot is a bug in our visualizer).
After slightly more than 150 steps, the anthill is nearly empty. Ants have
started random exploration and collision avoidance routines, which is the
reason why some ants seem asymmetric. The keeper structure is complete and
intact. Five of the seven ants making up the keeper will never move again.
The top left one reacts to incoming ants delivering food, and the one
facing right can help in setting up a trap, as described elsewhere(?).
Note that all the home markers point around the keeper structure to its
entrance.