Ant colony simulation written in pure JavaScript.
- Ants (purple and blue pixels) follow pheromone trails in order to find their way to and from food sources.
- Green pheromones attract ants who are looking for food.
- Red pheromones attract ants who are looking to return to the ant hill (red center circle) with food they've collected.
- As an ant leaves the ant hill, it produces red pheromones.
- As an ant leaves a food source (pink rectangle), it produces green pheromones.
- Overtime, trails of pheromones will form which will act to guide other ants in finding food and returning home.
Still interested?
- This project was inspired by a youtube video create by Sebatian Lague which goes into more detail.
- The project is being hosted here