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.
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.