Ants

Ants aren't very smart, yet a colony of ants will exploit food sources in order of their distance from the colony. In other words, we could use a colony of ants to sort a list of numbers.

In the Ants model ants (turtles) wander around randomly. If one finds a piece of food, he brings it back to the ant hill, leaving a chemical trail as he goes. The chemical has a diffusion rate (the width of the trail) and evaporation rate (how long the trail lasts). Both of these can be controlled by the user.

If a wandering ant comes across a chemical trail, he follows it to its source. If he finds food, he brings it back to the ant hill and reinforces the chemical trail.