MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

boundary conditions on CellularAutomaton function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115102] boundary conditions on CellularAutomaton function
  • From: naivetheorist <rjgaylord at gmail.com>
  • Date: Thu, 30 Dec 2010 19:06:34 -0500 (EST)

i have two questions:

(1) In the CellulafrAutomaton function, how does one specify the
boundary conidtions? A friend has run the Game of Life using the
function

GameOfLife = {224, {2, {{2, 2, 2}, {2, 1, 2}, {2, 2, 2}}}, {1, 1}};
ArrayPlot[Mean[CellularAutomaton[GameOfLife, RandomInteger[1, {100,
100}],100]]]

(these lines are taken from the Function Navigator in Mathematica)

and compared the execution speed with 3 Game of Life programs that  i
had written in Mathematica (they are in various of my simulation
books) books - i was especially prod of the version which first
generates all 256 rules, one for each possible neighborhood
configuration, and then applies the rule set directly by pattern-
matching without performing any arithmetic computation; it was very
fast as i expected since Mathematica is a ruled-based term rewriting
system; needless to say i was shocked (and crestfallen) to find that
using the built-in CellularAutomaton function runs the Game of Life 40
(forty) times faster than my fastest home-brewed version - perhaps
because it's not written in the Mathematica language? but i digress.

the question is this: the expressions above and my programs gave
identical results and i know that my programs use wrap-around boundary
condition (sometimes called periodic boundary condition) but i can't
figure out what arguments in the CellularAutomaton function specify
the boundary conditions and what values of these arguments give what
b.c. - or does the function always use wrap-around b.c.?

this is crucially important in the use of the function to model
various physical phenomena. Eg., a CA model of crystal growth or
forest fire spreading or even a random should use an infinite grid
with no b.c. while other physical or chemical or biological systems
should use a reflecting b.c., or an absorbing b.c. or even a mixed
b.c. in their CA models.

this is already a long post so i'll state mt second question in a
separate post.


  • Prev by Date: Re: Mathematica daily WTF
  • Next by Date: Re: newbie list question
  • Previous by thread: How to turn off curly quotes in Mathematica 8?
  • Next by thread: Style Sheet Font Family Not Applied to Standard Form Input Cell