cpetry / AntSim

A fun project to test some pathfinding and genetic algorithms
https://cpetry.github.io/AntSim/
MIT License
18 stars 2 forks source link

Add pheromones #10

Closed cpetry closed 7 years ago

cpetry commented 7 years ago

Let ants create pheromones.

cpetry commented 7 years ago

Interesting fact about pheromones used for searching food:

https://en.wikipedia.org/wiki/Ant#Communication

Since most ants live on the ground, they use the soil surface to leave pheromone trails that may be followed by other ants. In species that forage in groups, a forager that finds food marks a trail on the way back to the colony; this trail is followed by other ants, these ants then reinforce the trail when they head back with food to the colony. When the food source is exhausted, no new trails are marked by returning ants and the scent slowly dissipates

cpetry commented 7 years ago

Found an interesting fact about pheromones:

There are about ten to twenty different (species dependant) pheromone perfumes, each represents a ‘chemical word’ that the entire colony understand. Pheromones can be used to summon a few ants to thousands of ants, depending on what is required. This may be the attacking of prey, the defending of the colony, the location of a sweet food source or the relocation of the colony, it works very well.

When an ant is squashed it releases a different pheromone that warns the others of potential danger. http://antark.net/ant-life/ant-communication/pheromones/

That means we can implement several different perfumes based on 'chemical words':

We can later on implement more if needed

cpetry commented 7 years ago

The user's code decides when pheromones are placed. A dying ant though shall always place a "Danger" pheromone by default.

cpetry commented 7 years ago

This issue can be closed after this feature is tested and implemented in a working tutorial.