wolframscience.com

A New Kind of Science: The NKS Forum : Powered by vBulletin version 2.3.0 A New Kind of Science: The NKS Forum > Applied NKS > Elementary Cellular Automata Logic help
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
Ryan Jones


Registered: Feb 2008
Posts: 2

Elementary Cellular Automata Logic help

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 :)

Report this post to a moderator | IP: Logged

Old Post 02-28-2008 08:16 PM
Ryan Jones is offline Click Here to See the Profile for Ryan Jones Edit/Delete Message Reply w/Quote
Jason Cawley
Wolfram Science Group
Phoenix, AZ USA

Registered: Aug 2003
Posts: 712

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.

Report this post to a moderator | IP: Logged

Old Post 02-28-2008 09:46 PM
Jason Cawley is offline Click Here to See the Profile for Jason Cawley Click here to Send Jason Cawley a Private Message Edit/Delete Message Reply w/Quote
Ryan Jones


Registered: Feb 2008
Posts: 2

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!

Report this post to a moderator | IP: Logged

Old Post 02-29-2008 09:30 AM
Ryan Jones is offline Click Here to See the Profile for Ryan Jones Edit/Delete Message Reply w/Quote
Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread


 

wolframscience.com  |  wolfram atlas  |  NKS online  |  Wolfram|Alpha  |  Wolfram Science Summer School  |  web resources  |  contact us

Forum Sponsored by Wolfram Research

© 2004-14 Wolfram Research, Inc. | Powered by vBulletin 2.3.0 © 2000-2002 Jelsoft Enterprises, Ltd. | Disclaimer | Archives