Artificial Termites

Artificial termites is a demonstration of autonomous agents and an example of simple artificial life. Each termite (red dot) has the same job, to move the wood (yellow dots) into piles. They follow these simple rules:

  • walk randomly
  • pick up wood unless already carrying
  • put down carried wood if adjacent to wood.

If your browser is Java capable then Artificial Termites will be running in the banner at the top of this page, if not a screenshot is shown. Parameters for the applet can be modified by using the control panel, just click anywhere in the banner. The percentage of wood and termites can be fixed, have a look at what happens with large amounts of wood. The height, width, and resolution can be changed, if the demonstration is too slow then narrow the banner. The applet uses the resize method to change its display space but this does not work within Netscape, anyone know why?

There are several advantages to organising a task so that it can be carried out in this manner:

  • each termite is simple
  • each termite is cheap
  • each termite is expendable

With a real task, which might be performed by robots, this can make a difference. A single complicated robot may carry out the task faster but would be harder to develop, costly to build, and could ruin the project by breaking.

Here are the Java code for the above applet:

A Macintosh version for 68K and PowerPC written in C++ is also available, it has the additional feature of termites which disperse the piles by dropping wood after a random distance.

Extensions which someone might want to investigate:

  • special termites to make patterns with the wood
  • user control over the termite rules


Thanks to the people at MIT Media Laboratory where I saw the original implementation of artificial termites. It was written in StarLogo a programmable modelling environment for exploring the behaviours of decentralised systems.