Skip to content

papplappen/ants_processing

Repository files navigation

Ants 🐜

This is a simulation of simple ant behaviour. Ants noisly move in a straight line until they encounter either food or the pheromones left behind by another ant. An ant that has found food is happy and will leave behind positive pheromones, while an ant that is starving will leave behind negative pheromones. Ants will steer towards positive pheromones and away from negative pheromones.

From this simple invidividual behaviour, the group of ants as a whole will automatically begin to form ant trails between sources of food and the ant hill.

screenshot

Controls

Input Effect
Left Click Add positive pheromone
Right Click Add negative pheromone
Middle Click Add food source
SPACE Unpause/pause simulation
S Show/Hide pheromones
ESC Quit
A Disable/Enable rendering completely