domingo, 21 de agosto de 2011

Cellular automatas and me

2 weeks ago I started to read Philosophy and simulation by Manuel DeLanda (thanks eskerda).

About one month ago I watched jdelgado's talk at Campus Party talking about science in science fiction, and he talks a bit about cellular automata too:


So I started to experiment a bit with cellular automatas myself, and implemented a Conway game of life in smalltalk. At first I wanted to write a very flexible (1d,2d,...nd) cellular automata engine, but once I had the 2d Game of life implemented, I realized that doing 1d things is easier if you do it with strings, or just lists (lisp lists, for example).

Well, so I implemented a 1d cellular automata in common lisp (nice exercise) and tried some interesting rules for the majority problem jdelgado mentions in his talk.

At first I thought majority problem had a defined proper solution, but searching on the internetz, it seems it's not trivial at all, and I couldn't find anything that takes me further than rule 184, that splits the list in a group of 0's and 1's.

If you want the implementation of the smalltalk GoL, ask for it (it's not that easy to paste smalltalk code on the web, you know...), or just download any already existent implementations on squeaksource, like Bernat's one.