> The second guess, more likely, is that you're using "is" to compare > numbers, and that's never a safe idea. It might happen to work for > small numbers, but you should be using ==. The second guess was right, changing "is" for "==" solved it, thanks. I still have a lot to learn about python semantics.
The 8 bit pattern is used to store the rule, not the cells. To compute the next cell, I index the rule list, based on the values of that cell and it's two immediate neighbours in the previous generation. This probably isn't the simplest way. Since I am using only 3 cells to compute 1 cell, the biggest index would be 2**3 - 1, hence the 8bit pattern for the rule. -- http://mail.python.org/mailman/listinfo/python-list