CSCI 385 - Lab 8
Cellular Automata and Agent-Based Models


Materials

Cellular Automata

Forest Fires

Complete the TODO items and questions at the end of the document in the Forest Fire Ipython document.

Diffusion

Complete the Diffusion Ipython document, such that the pollutant from the factory can be affected by a breeze from West to East. This breeze is controlled by a parameter between 0 and 1 called WINDSTRENGTH.

Agent-Based Models

Implement an Agent-Based Model to model the collective behavior of termites. In particular, you will be modeling how they organize to build large structures without a leader.

Cellular Automata

The world of the termites will have two states, DIRT and EMPTY. Make the DIRT state appear yellow, and the EMPTY state be black. Look to the Forest Fire model for how to represent this.

Initialize your CA with a size of 40x40 and 200 pieces of dirt. In this model, the CA will not need to update its state, only hold information for the termites about the environment.

Termite

We will use three states to model our termite behavior, FORAGE, LOOK, and DROP.

When a termite is in the FORAGE state, they wander randomly around the world. If they step on top of a cell that contains DIRT, they pick it up, making their current cell EMTPY, and change to the LOOK state.

In the LOOK state, the termite is looking for another piece of DIRT. They will again wander around the world randomly until they are standing on a cell with DIRT. When this happens, they change their state to DROP.

Finally, a termite in the DROP state is now looking for an EMPTY cell in the world. They wander randomly until they find this EMPTY cell, then put their DIRT into the cell. They then take 5 random steps, and finally change to the FORAGE state. This last piece helps them not to immediately pick up the piece of DIRT they just dropped.

Create 50 termites, and place them randomly in the world to start.

Run your model for 1000 iterations. Describe what you see in terms of the formation of piles of dirt.