Back to Home

CA

So it's fashionable is it?

When I heard that "A new kind of science" was coming out I though I really ought to read the previous work "Cellular Automata and Complexity" to get myself up to speed (my maths is a little rusty). It took so long to get a copy of the book that "A new kind of science" was out by the time I got it. But like a good boy scout I am reading through Cellular Automata and Complexity before I move on

And the code?

So I wrote some code to go along with my reading and here it is. It can do 1D cellular automata and covers up to about page 58 when the 2D cellular automata start to appear. Its written in Ruby.

This little zip archive contains the Ruby source for CA. Extract the archive to where ever you want it and run it.

1D Cellular Automata code

The future

2D automata are calling as I'm sure will 3, 4 and all the way up to n. I doubt that this code will be able to handle arbitary dimensions so new code will appear, until then the obligitory Rule 90

  0 : .........................1.........................
  1 : ........................1.1........................
  2 : .......................1...1.......................
  3 : ......................1.1.1.1......................
  4 : .....................1.......1.....................
  5 : ....................1.1.....1.1....................
  6 : ...................1...1...1...1...................
  7 : ..................1.1.1.1.1.1.1.1..................
  8 : .................1...............1.................
  9 : ................1.1.............1.1................
 10 : ...............1...1...........1...1...............
 11 : ..............1.1.1.1.........1.1.1.1..............
 12 : .............1.......1.......1.......1.............
 13 : ............1.1.....1.1.....1.1.....1.1............
 14 : ...........1...1...1...1...1...1...1...1...........
 15 : ..........1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1..........
 16 : .........1...............................1.........
 17 : ........1.1.............................1.1........
 18 : .......1...1...........................1...1.......
 19 : ......1.1.1.1.........................1.1.1.1......
 20 : .....1.......1.......................1.......1.....

Back to Home