cellular automata

i'm a bit obsessed with cellular automata, give a grid of cells a few simple rules and you can lose hours watching what happens. my 2017 dissertation at southampton was on modelling slime mould in java, looking at how local interactions turn into networks and what happens when you make two colonies compete. this is mostly an excuse to keep messing around with that stuff.

this is the one from my dissertation. lots of tiny cells sensing food and following trails, with no idea what the whole colony is doing. somehow you get a network out of that. still quite happy to sit and watch it.

the baseline from 2017. try putting food in a few places, then a wall between them. the cells only sense what's nearby; the paths are the colony figuring it out collectively.

starting…

drag to draw; shift or right-drag to erase. wheel to zoom. middle-drag or the pan tool to move. space pauses when the canvas is focused.

what am i looking at?

i built the original model in java for my computer science dissertation at southampton in 2017. this rebuild follows the sensor geometry, separate food field, collision checks and gaussian diffusion described in the report.

  • local food: short-range food cues, as in the baseline model.
  • long-range sensing: a wider food field. try the food sensing view to see what the cells can pick up.
  • competition: two colonies follow their own trails and avoid the other colony's trails. food is shared. warm and cool colours distinguish the colonies.

cells use eight compass directions and three 3×3 sensor patches. with no signal they turn randomly. occupied cells block movement. the sensor distance of 8 and angle of 45° come from the report's final parameter selection. diffusion uses the 3×3 gaussian kernel shown there: centre 1/4, cardinal neighbours 1/8, diagonals 1/16, followed by trail decay.

the board has closed edges; diffusion reflects at the outer boundary. food doesn't run out, and the long-range food field is a gaussian approximation. walls remove any cells painted over and block movement, but food sensing can extend through them. cell count is capped at the number of grid spaces.

the pdf includes a sensor-code excerpt, not the full java project. this is an adaptation, not a line-for-line port or a reproduction of the results. the earlier trail sketch is still here for comparison: that one uses continuous headings, wrapping edges and no collision exclusion.

source: modelling the emergent behaviours of slime mould and investigating modifications of the model, 2017, pp. 9–18 and 24–27. the original work builds on jeff jones' particle models.