jacob andreas [.net]

Variations on a theme by Conway

May 10, 2009

Inspired by CS1004’s Game of Life assignment, I’ve been playing around with different rule sets for various cellular automata. One of the CAs I came up with, what we might call the “Goldilocks game”, produces some really nice-looking results. It’s defined as follows:

  1. Choose constants A, B, C and D.
  2. Define for each cell some temperature T, initially equal to zero.
  3. Define for each cell a value N, the sum of all its (8-connected) neighbors’ temperatures.
  4. If T = A, it is “hardened” and remains unchanged for the rest of the game.
  5. If N > B, set T := 0. (The neighborhood is “too hot”.)
  6. If C < N < B, set T := T + 1. (The neighborhood is "just right".)
  7. If N < C and N < D, set its temperature to 0. (The neighborhood is "too cold".)
  8. If no other condition was satisfied, the cell remains the same temperature.

A couple of my favorites are shown below. Click inside the applet to start/stop.

A=100, B=90, C=6, D=7

A = 255, B = 300, C = 10, D = 7. Note the marquee-style blinking dots that grow along the horizontal and vertical pathways.

Source code is available at http://projects.jacobandreas.net/cellular/src. I may try to put together an interactive version as well.

fine print

All content in public domain unless otherwise specified. Powered by prgmr, FreeDNS, Wordpress and vim.