von Neumann Cellular Automaton
- To: mathgroup at smc.vnet.net
- Subject: [mg56094] von Neumann Cellular Automaton
- From: Manuel Marques-Pita <m.marques-pita at ed.ac.uk>
- Date: Fri, 15 Apr 2005 04:47:39 -0400 (EDT)
- Organization: Edinburgh University
- Sender: owner-wri-mathgroup at wolfram.com
hello again, I am trying to simulate a von Neumann CA with k=3 states, 5-cell neighbourhood (rule size is 243) I am very confused about how to specify what neighbours should be considered by the rule. For the Moore case it's simple, but I cannot see how to do it for von Neumann (I am not using totalistic rules, but any general rule) I am trying the following (* my example rule: in inverse lexicographical order:*) (* neighbourhood {2,2,2,2,2} outputs stripes[[1]] *) stripes = {0,1,2, 0,2,0,1,2,0,2,2,0,0,1,0,0,2,1,1,1,1,0,1,2,1,0,0,1, 2,1,2,2,2,1,0,1,2,1,1,1,2,1,1,0,0,0,2,2,1,2,2,0, 1,0,1,2,0,0,1,1,0,2,0,0,0,1,0,0,0,0,2,1,2,0,0,0, 0,2,0,0,1,2,0,1,1,1,1,0,0,2,0,0,1,1,1,2,2,2,0,2, 0,0,2,0,1,1,0,0,2,1,0,2,2,1,0,0,1,2,0,2,2,0,0,2, 2,1,2,0,1,1,0,0,1,0,0,2,0,2,2,1,1,0,2,0,0,2,0,0, 0,1,1,2,1,0,0,1,2,0,1,1,2,2,1,1,1,2,1,0,1,2,1,2, 0,1,2,0,0,0,2,0,0,0,0,0,0,0,0,1,0,0,1,0,2,2,0,0, 1,0,0,2,2,2,0,2,0,0,0,1,0,0,1,1,0,1,0,0,1,0,0,2, 2,2,0,1,1,0,0,1,2,1,0,1,2,0,0,1,0,1,0,0,1,0,0} (* initial configuration *) init2 = { {0, 0, 0, 0, 0}, {0, 0, 2, 0, 0}, {0, 2, 2, 2, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 0, 0}}; iterationList = CellularAutomaton[{FromDigits[stripes,3],3,{{0,1},{-1,0},{0,0},{1,0},{0,-1}}},init2,1] This is using the offsets for determining what neighbours to consider. And I know the problem is there, not no idea of how to set it right. The way I understood this is that {0,1} will take the cell to the north, then {-1,0} the one to the left, then {0,0} the actual central cell, {1,0} the cell to the right and finally {0,-1} the south cell. I do this for one time step and according to the rule, the result of the first time step should be { {0, 0, 1, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 1, 1, 0}, {0, 2, 1, 0, 0}, {0, 0, 2, 0, 0}}; (If my hand calculation of each state for t=1 is correct) I also tried using the *weights* as in the documentation, but I do not understand how to make these weights work at all... Any suggestions/ideas? Thanks very much!!! Manuel