ANT LINES

WHAT IS IT?
-----------

	This project models the behavior of ants following a leader towards a 
food source. The leader ant moves towards the food along a random path; 
After a small delay,the second ant in the line follows the leader by 
heading directly towards where the leader is located. Each subsequent ant 
follows the ant ahead of it in the same manner. The model is based on the 
work of Alfred Bruckstein (see, Bruckstein (1993) "Why the ant trails 
look so straight and nice", The Mathematical Intelligencer, Vol. 15, No. 
2). Even though the leader may take a very circuitous path towards the 
food, the ant trail, surprisingly, adopts a smooth shape. While it is not 
yet clear if the ant-lines model is a biologically accurate model of ant 
behavior, it is an interesting mathematical exploration of the emergent 
behavior of a series of agents following each other serially.  

RUNNING the MODEL
-----------------

	The SETUP button initializes the model. A brown ant nest is placed on 
the left side of the screen. Inside it are a number of ants (yellow) 
determined by the N-ANTS slider. On the right hand of the screen is a 
pink source of food.

	The GO button starts the ants moving. The leader ant (turtle 0) is set 
in motion roughly in the direction of the food. It wiggles as it moves. 
That is, it does not head directly towards the food, but changes its 
heading a random amount to the left or right before it takes each step. 
The maximum amount it can wiggle at each step (and therefore the 
raggedness of the leader ants path) is governed by the WIGGLE-ANG slider. 
When the leader ant gets close enough to the food to "smell" it, it stops 
wiggling and heads directly for the food. The leader ant leaves a red 
trace as it moves. Each subsequent ant follows the ant ahead of it by 
heading directly towards it before it takes each step. The follower ants 
do not leave a trace. The yellow line of ants, however, traces out a 
curve on the screen. The last ant to go leaves a blue trace. The amount 
of time between ants departing their nest is governed by the DELAY slider 
(plus some random factor). The speed of the simulation can be slowed down 
or speeded up as governed by the SPEED slider. The ANTS-RELEASED monitor 
keeps track of how many ants have left the nest. The other monitor keeps 
track of the heading of the lead ant.

THINGS TO NOTICE
----------------

How does the shape of the ant line change over time?

How does the path of the initial ant compare with the path of the final 
ant?
	
THINGS TO TRY
-------------

Try varying the maximum wiggle angle (WIGGLE-ANG). How does that affect 
the shape of initial and final ant lines?

Try varying the delay. How does that affect the shape of initial and 
final ant lines?

How can you slow down the flattening out of the ant line? Can you make 
the path fail to converge to a straight line? 

How can you speed up the flattening out of the ant line? 

EXTENDING THE MODEL
-------------------

How might you keep track of, measure, or graph the flattening process?

What if you relaxed the ant following rules -- add some wiggle to the 
following behavior? 

STARLOGOT FEATURES
-----------------

	In StarLogoT, the default behavior of the ants is to move in parallel. 
Notice the use of delays based on turtle WHOs to make the turltes leave 
the nest serially.
if (xcor-of (who - 1)) > (nest-x + delay +  random-delay) [fd .5]