Ant Foraging

This a demo of ant foraging behaviour where ants spread out from the nest to search for food sources and bring food back to the nest. Ant behaviour is described by a small set of rules with different behaviours on the outbound and inbound journeys. Pheromones deposited on the outbound journeys create a gradient from the nest (plum trails), whilst pheromones deposited on the inbound journeys create a gradient from the food sources (aquamarine trails). The environment is mapped as a grid of cells. Ant movement is stochastic enabling Monte Carlo search. Dark grey regions represent obstacles. The scent of the food is shown in yellow.

Ants returning to the nest follow the pheromone gradient left by the ants searching for food, and vice versa for ants on route to food sources. Grid cells record the level of the nest and food pheromones deposited on them. These levels decay slowly as the pheromones evaporate. Ants deposit pheromone if the cell's pheromone value is less than the ant's internal estimate based upon the time it has travelled from the nest or food source. The ant updates its estimate if is less than the cell's pheromone value. This allows ants to cooperate in mapping the gradients that guide their movement. Ants can follow the scent of the food if they are near enough, but pay more attention to food pheromones deposited by other ants.

Some potential determiners of behaviour include:

Swarms are interesting in that the behaviour of a swarm emerges from simple behaviours of their participants as they interact with each other and with the environment. Further study on swarm intelligence would explore how swarms can behave as a single entity (a hive mind) that can set its own goals, execute plans, and learn from its experience. An open question is the role of direct agent to agent communication as compared to indirect communication via the environment (stigmergy).

In this demo ants pay no attention to each other. In other kinds of swarms, the swarm agents are sensitive to their immediate neighbours, e.g. shoals of fish and flocks of birds. Further challenges arise if agents can learn from interacting with each other. How can agents learn and apply cognitive norms for accepted behaviour in a group? How can we design agents for social intelligence? Further demos will explore some of these challenges.

See also: routing using antswarms, and routing using A* over a grid.

p.s. the ant sprites are courtesy of DudeMan at Open GameArt (license CC0).


eu logo This work is supported by the European Union's Horizon research and innovation programme under grant agreement No. 101092908 for project SmartEdge on swarm-based orchestration for the IoT.