Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: 2D cellular automata (non-totalistic)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75073] Re: 2D cellular automata (non-totalistic)
  • From: "alexxx.magni at gmail.com" <alexxx.magni at gmail.com>
  • Date: Mon, 16 Apr 2007 20:08:55 -0400 (EDT)
  • References: <evpnh0$60l$1@smc.vnet.net><evsqmm$10a$1@smc.vnet.net>

On 15 Apr, 11:19, Jean-Marc Gulliet <jeanmarc.gull... at gmail.com>
wrote:
> alexxx.ma... at gmail.com wrote:
> > Greetings,
> > I want to re-implement a 2D CA I already wrote time ago in C++.
> > Its scope was to read a BW image, then evolve it according to some
> > rules. Specifically, by the rules I wrote I am able to "etch" the
> > input image obtaining a skeleton or graph of the input image...
> > These rules, if I understand correctly the term, are non-totalistic,
> > i.e. they don't depend just on the total number of B/W cells in the
> > neighborhood.
>
> > Example from my input file:
> > ...............
> > RuleSEinput
> > 0 0 0
> > 0 1 1
> > 0 1 1
> > RuleSEoutput
> > 0 0 0
> > 0 0 1
> > 0 1 1
> > .......................
> > RuleTreeLeftinput
> > 1 1 0
> > 1 1 0
> > 1 1 0
> > RuleTreeLeftoutput
> > 1 1 0
> > 1 0 0
> > 1 1 0
> > ........................  etc
>
> > my program scans the image with the *input pattern, substituting the
> > *output pattern if a match occurs (scanning with or without overlap,
> > i.e. with a step=1 or step=3 along x and y in the case of 3x3 rules) .
>
> > Is this a nontotalistic 2dCA?
>
> > Now, do you have some hint on how to implement it in Mathematica - or
> > has something similar already been done?
>
> > thanks for any help...
>
> >Alessandro Magni
>
> Hi Alessandro,
>
> Since version 4.2, Mathematica includes a built-in function called
> CellularAutomaton [1, 2]. Chapter 5 [3] of Stephen Wolfram's _A New Kind
> of Science_ may be worth reading as well as the implementations notes
> starting on page 927 [4].
>
> Overall, I believe that these kind of questions would be better answered
> if asked in the NKS Forum [5].
>
> Regards,
> Jean-Marc
>
> [1] "CellularAutomaton",http://documents.wolfram.com/mathematica/functions/CellularAutomaton
>
> [2] _The Mathematica Book_, "3.8.6 Cellular Automata".http://documents.wolfram.com/mathematica/book/section-3.8.6
>
> [3] _A New Kind of Science_, "Chapter 5: Two Dimensions and Beyond",http://www.wolframscience.com/nksonline/chapter-5
>
> [4] _A New Kind of Science_, "Chapter 5 Notes > Section 2 > Page 927",http://www.wolframscience.com/nksonline/page-927
>
> [5] _A New Kind of Science Forum_,http://forum.wolframscience.com/



thank you for the kind answer, I'll try [5] ASAP.
Anyway, just in case somebody can also help me here, my problem was
really how to write down my rules inside the CellularAutomaton
procedure.

Given its form  CellularAutomaton[rnum, init, t, off]
rnum can have different forms, as
n
{n,k}
{n,k,{r_1,...,r_d}}
...

but overall they all are defined (it seems to me) by the rule
identifier n.
I don't know what n represents. What I know is the if->then rules
shown before.

any hint?

thanks!

Alessandro




  • Prev by Date: Re: differentiate a function of a function
  • Next by Date: Overlaying 3d plots
  • Previous by thread: Re: 2D cellular automata (non-totalistic)
  • Next by thread: Memory issue in Mathematica 5.1 (Windows XP)