Monday January 6, 2014
This problem concerns a model of ants moving and communicating using chemical pheromones.
The following is a description of a model for which you should provide a computer implementation, ideally which includes a visualization, alternatively which writes data to a file that could be used for a visualization.

A 2-D environment contains ants that move around, releasing chemical pheromones as they move.

Each cell in the environment contains a certain amount of pheromone, and some cells contain single ants.

At each time step in the simulation, each ant will attempt to move into the neighboring cell that contains the most pheromone. It does this by first facing toward the cell into which it wishes to move, and then if no other ants are also facing toward that cell (and if that cell does not contain another ant), the ant moves into the cell.

If more than one neighboring cell contains the most pheromone, the ant will choose among those cells at random.

Cells that contain no ants will lose a single point of pheromone each time step. Those that contain an ant will have no change to the amount of pheromone. If an ant leaves a cell, that cell will gain a single point of pheromone.

The environment starts with a single, linear trail, of maximum 10 cells, placed randomly in the environment. The first cell in the trail has 1 point of pheromone, and each successive cell in the trail has 1 additional point of pheromone than the cell before it.

Input parameters to the model should include the width of the environment, the height of the environment, and the number of ants (who will be placed randomly in the environment).


This model was inspired by Shiflet, A. B. and Shiflet, G. W. (2006). Module 11.3: Movement of Ants. Introduction to Computational Science (pp. 422-431). Princeton, NJ: Princeton University Press.
Show solution
Challenge Resources:
©1994-2014   |   Shodor   |   Privacy Policy   |   NSDL   |   XSEDE   |   Blue Waters   |   ACM SIGHPC   |   feedback  |   facebook   |   twitter   |   rss   |   youtube Not Logged In. Login