Found this to be a fascinating subject. Apparently there's been a lot written on group behaviour and lots of code written to simulate ants, flocks of birds and schools of fish.
So, I decided yesterday to play around with this a bit. Here's my half-assed attempt at ant AI
twistedvoid.com/antz
I'm only using a maximum of 300 ants so that it runs on my old laptop well. Since each ant is animated I didn't want to lag things out with gobs of ants.
Ants exit the ant hill periodically and begin searching for food in a mostly random pattern. If food is located, it then uses the pathing behaviour to find it's way back home. As it travels back home it looks for a trail of 'pheromones' to see if another ant has found the food and went home. If so, it refreshes the trail. If not, it lays a new trail. The trail lasts 10 seconds if not refreshed.
Rather than pathing, the trail is used to help ants find the food source (somewhat like real ants).
Ants that step on the trail examine it to see which way the trail points and then, attempt to follow it's direction to the food source. Since they don't yet know if the food exists, they don't refresh the trail.
Each food item has 100 points and each time an ant takes some it reduces those points by 100. If the food reaches 0, it despawns.
When ants carrying food return to the ant hill, they despawn.
If an ant has been wandering around for a while and steps on the ant hill, it despawns.
You can download this very crude experiment here:
twistedvoid.com/antz/Antz.c3p