One-dimensional 256-state Cellular Automaton in HTML5 (and JavaScript), just because.

Touch canvas to restart the same ruleset with a new random world.

There should be a canvas here.

Current rule orderliness: ? (out of oh say 84ish)

New 60 ruleset New 64 ruleset New 70 ruleset New 80 ruleset New ?? ruleset

You can View Source to see the code, as it's completely non-obfuscated. It's a little hard to describe in words :) but it's a radius-one (i.e. each cell can see only itself and its immediate left and right neighbors, wrapping at the edges), 256-state (each cell is at any time in one of 256 possible states, represented here by colors, with time obviously moving down), deterministic finite automaton (that is, the color of each pixel at any time is determined by the color of itself and its neighbors at the just-prior time).

While it's completely deterministic while running, you can get a new (deterministic) ruleset by pushing one of the "New xx ruleset" buttons. The higher the number, the more generally orderly the world is likely to get while the rule runs.

I did this because this is the program that I write with every new platform that can do pixel-graphics, and I heard that HTML5 could. And indeed it can! So there we are. If I get ambitious, maybe I'll do a version where you can drag the corner of the canvas to resize it, or something...

David M. Chess, http://www.davidchess.com/, http://ceoln.wordpress.com/