This was a pretty cool project. It was written in Objective-C, and used Apple's Quartz technology for the simplified GUI. The aim was to learn a little about artificial intelligence, and to model the AI after something in nature.

A colony of ants is dynamically and randomly generated in an empty environment. When the colony runs low on food supplies, they send out scouts to locate sources of nutrition. They have to seek out the lone source (again, randomly placed in the environment), and relay the location of the food to their brethren. Pheromones are how most social insects do this in the real world, and that's how I made these virtual ants share information. (Side note: I had no idea how accurate these trails are in real life... bees do orchestrated dances which can be deconstructed). When a food source is found, the ant will lay down plenty of pheromone, and make a b-line for the colony, laying down the informative notes along the way.

Many nifty optimizations to this semiochemical interaction exist. For instance, ants can lay down both a "hot" and "cold" trail. Succeeding ants will smell the cold trail and know that this area had been searched to no avail, while a hot trail can be used to indicate that an ant had successfully found food and the source is extant. Upon finding a cold trail, they will immediately turn around and start looking in another area. It's interesting to consider that the "hot" trail represents an optimal path between the colony and the food, as over time more and more ants who follow the trail lay down more "hot" knowledge. I mimicked this behavior here.

Anyways, the project turned out much better than expected - you could actually witness the ants work together without ever directly sharing knowledge. I built in a few cool things too, such as attacking grasshoppers (which ants had to work together to defeat), and a way to erase parts of the pheromone trail (it was strangely hilarious and fulfilling to watch them scramble around looking for a path they were just following).

Unfortunately, the only media I have remaining from the project (my laptop was stolen and backups lost), is with a sample video I made halfway through the project's completion. Still, you can see where it was going: