Cellular automaton model

I’ve been meaning to make a “pretty” implementation of an Xscreensaver hack for ages. It’s called “demon”, and it features a random grid of colored cells that end up in swirling color patterns. I finally got around to trying it out, and used it as an opportunity to play with Mac OS X’s graphics APIs.

Code!

Without any particular context, here is how I iterate. Note that I make the edges wrap around. If the syntax is slightly wacky-looking that’s because it’s Objective C.

Iteration

The logic itself is fairly simple; at each iteration, one particular color of cell gets to “eat” any neighbors of the previous color. To wit: First the red pixels gets to eat their purple neighbors, then the orange pixels get to eat their red neighbors, then the yellow the orange, and so on, until red comes around again. Stable arrangements come up when you have cyclical patterns where the colors can chase one another forever without getting consumed or any one color is entirely eliminated, at which point a cycle can never emerge.

- iterate{ static int c = 0;

Source: Home of the Ghostlords

You might also like:

DC16 Badge Hack: Cellular Automaton
From the paper by Anirban Bandyopadhyay, Ranjit Pati, Satyajit Sahu, Ferdinand Peper, Daisuke Fujita,
Cellular Automaton Rules
Critter and Guitari Cellular Automata Synthesizer by Owen Osborn
Critter and Guitari Cellular Automata Synthesizer

Complexity lab manual table contents part 2

JJ) John Horton Conway's game of life:
PPPP) game of Go
TTT) Look at Tierra! how cell automata can EVOLVE!
YYY) cell automata with NON local rules
UUU) cell automata with random input
XXX) prime numbers, fibos
QQQ) classification of finite simple groups
RRR) Xnew=mXold(1-Xold) and Mandelbrot set
OOOO) talk about analog/digital
NNNN) now comp...s
AI reasoning vs trial and error, knowlege representation
Cellular Automata/Dynamical systems
Mathematical structures primes, fibos, groups
Auto Repair
Chemistry
Organic Chemistry
Minerology
Geology
Bateson's Mind and Nature

A Computable Universe - Roger Penrose On Nature As Computation  — iProgrammer
Following on from the recent ten-year anniversary of the publication of Steven Wolfram's A New Kind of Science, we have an other "big book" on how …

1/2 Price Phones

Phones Clearance Sale Hurry While Stocks Last !

A cellular automaton (pl. cellular automata, abbrev. CA) is a discrete model studied in computability theory, mathematics, physics, complexity science,.

Related posts:

  1. Cellular automata model
  2. Cellular Automata as model
  3. Cellular automata stout
  4. Cellular automaton Java
  5. Cellular automaton sound