A simulation of ants collecting food
This is a simple simulation of ants collecting food.
The idea is that each ant either leaves a "positive" pheromone at its current position, if it is currently carrying a piece of food.
Or if it is not, it will leave a "negative" pheromone.
If an ant with food enters the hive, it will drop the food.
Now whenever an ant is looking for food it follows the positive pheromones.
And if it wants to get back to the hive it follows the negative pheromones.
All pheromones degrade over time in strength.
Comments