Wolfram’s Cellular Automata

I’ve had fun reviving another old PHP project — code to draw the evolution of 1D cellular automata using the codes described by Stephen Wolfram in his book “A New Kind of Science”.

See https://github.com/fadend/wolfram-ca-php. One thing I added over my 2004 version is the ability to easily start with just a single point turned “on”, matching what Wolfram has in the book. With that it’s much easier to see relations between the rules. E.g., it looks like 124 flips the famous 110; maybe it’ll be obvious why if you look at the corresponding mappings.

You can play with it here: https://revfad.com/cgi-bin/wolfram_ca.php.

One thing I enjoy with PHP is the immediacy between editing and being able to see the results, similar to the joy you can get with JavaScript. I enjoyed this discussion of copy-on-write semantics for PHP arrays, which I apparently knew about in 2004 and have now learned about again. (I’m still thinking about whether I enjoy those semantics.)


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *