User Tools

Site Tools


env-model:classes:first2014:finalproject:terminte

[back]

TERMITE

This purpose of this model is to simulate the movement of termites as they pick up wood chips in a space. The termites wander around randomly until they hit a wood chip. When the hit a wood chip they pick it up and move randomly away from that place. When the termite hits another wood chip it will drop the wood chip beside that one and move to another random place until it hits another wood chip.

This cycle continues until all of the wood chips end up in a single pile. This pile is usually ends up being somewhat route in shape.

WHAT IS IT?

The termites model simulates termites pick up and drop off wood chips. Each termite moves by finding empty cells from a location from the celluer space. The termites jump around randomly until they find wood chip in their neighborhoud. When they find a wood chip they pick it up(it disapears)and move randomly away from that place. When the termite finds another wood chip in their neighborhoud it will drop the wood chip on the place he is standing and move to another random place on the cellular space.

HOW IT WORKS

In the model we create cellular space, define neighborhood, place wood and empty cells, define society with the number of agents (termites) and timer. We also define environment with cellular space, society and timer. At the beginning we assign an attribute to all termites; hasChip=0, which means that they don’t have a chip (with a function sheibe which returns a neighboring wood cell). Then we check if the agent is not carrying a chip and if there is a wood in the neighborhood of the agent (with a function sheibe which returns a neighboring wood cell). If so, neighboring cell with wood becomes empty and agent moves to the empty random cell in the space and we assign him a chip (hasChip = 1). If not, we check if the agent is carrying a chip and that there is a wood in the neighborhood of the agent. If so, agent’s cell becomes wood and agent moves to the empty random cell in the space and we take his chip (hasChip = 0). Finally if there is no wood in the neighborhood agent moves to the random cell in the space. Later we can run a simulation. Here we have defined legend and observer.

How to Use the Model

To initialise this model you must first set the parameters for the following:

  • Set your Grid Size - This sets the how many cells your cellular space will have.
  • The number of Termites
  • The percentage of randomly distributed Wood Chips

THINGS TO NOTICE

As time passes termites group wood into clusters. Speed of clustering depends on input parameters.

Things to Try

In order to see how the termites respond to varying levels of wood chips you should try to vary these parameters for example:

  • Wood Chips Try values such as 0.8 (20%), 0.2 (80%), 0.5 (50%).

It is also interesting to vary the number of Termites (Agents):

  • Set Agents Value to 5, 10, 20, 100

You will see that the termites move much more rapidly in this case.

Extending the Model

This model in it's current implementation does allows for the termites to continually move randomly in any direction, with out with out the wood chips.

This model could be extended as suggested by Resnick to count the number of wood chips in each pile and also output the number of termites carrying chips at each time.

TerraME Features

The main features being used from TerraME are as follows:

  • Cellular Space is set up using the CellularSpace() function.
  • The createNeighborhood() function is used and supplied with the moore strategy for neighbourhoods.
  • Agent is used to represent the termites moving throughout the cellular space.
  • Society
  • Timer
  • Environment
  • Legend and observer (for simulation)
  • Sample and getCell functions

Credits and References

This model is inspired by the Termites model of Mitchell Resnick.

env-model/classes/first2014/finalproject/terminte.txt · Last modified: 2014/10/02 13:11 by tiago