Skip to content

Dmrgn/Ants-Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ants-Simulation

Ant colony simulation written in pure JavaScript.

Image of ant simulation

What is this?

  • 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?