[Elementary Cellular Automata Logic help] - A New Kind of Science: The NKS Forum

A New Kind of Science: The NKS Forum

Pages:1



Elementary Cellular Automata Logic help

(Click here to view the original thread with full colors/images)



Posted by: Ryan Jones

Hi guys!

I've been reading the book with keen interest and decided to take a shot at implementing the basic cellular automation patterns but I ran into a problem and need clarification.

I'm using a an array to hold each row of data. As each cell is processed the values of the cells in the last row are observed and the current cells type is set. The problem I'm having is this. What should I do about the first and last cell in each row?

They can't be checked against the type as there are not three values to check unless I say check the last cell on the previous row as well as the other two when processing the first column of cells.

I can't figure out if that is correct so hopefully you guys can provide some insight :)



Posted by: Jason Cawley

Yep, a well known issue. You basically have three choices - either to use "wrapped" boundary conditions, by treating the rightmost cell as the right-hand neighbor of the left-most cell, which effectively arranges the cells on a cylinder - or "infinite" boundary conditions, for which you treat any cell beyond those reached so far by the pattern as "padded out" with new additional sites of value zero - both of those are common solutions. A third possible, but uncommon solution is to treat the two boundaries as fixed at value 0 - so there are "neighbors" off the edge with value zero, but the pattern doesn't grow beyond its initial width.

In Mathematica, the default for a finite initial condition is to wrap the boundary, cylinder-style. The default for a periodic background, including a uniform background of 0s (the "simple iniital condition" of a single 1 on the 0 background, used in the book) is to use the infinite "sea of 0s" boundary condition. Note that to implement the second, infinite boundary condition, you have to be able to handle the growth of the pattern; the width is no longer fixed. For a fixed allocated array like you allude to, a wrapped boundary condition is the simplest thing.

I hope this helps.



Posted by: Ryan Jones

That's interesting. I would have tried the infinite boundary type bit it seems a lot more complex to manage and would probably only be helpful in a handful of cases.

I'll have to do some experimenting to see which one will work best. Thanks for the reply!





Forum Sponsored by Wolfram Research

© 2004-2008 Wolfram Research, Inc. | Powered by vBulletin 2.3.0 © 2000-2002 Jelsoft Enterprises, Ltd. | Disclaimer
vB Easy Archive Final - Created by Xenon and modified/released by SkuZZy from the Job Openings