The MAP Syntax
Posted: July 1st, 2017, 4:53 am
How does the MAP syntax work?
This answer to a MAP-related question might also be useful to walk through. It's a little hard to wrap one's head around at first -- the position of each binary digit is itself a neighborhood pattern encoded in binary. Same kind of thing as Wolfram rule numbering.gameoflifemaniac wrote:How does the MAP syntax work?
In the same way, to make modifications yourself, choose a transition. Mine will be B7e(South).dvgrn wrote:This answer to a MAP-related question might also be useful to walk through. It's a little hard to wrap one's head around at first -- the position of each binary digit is itself a neighborhood pattern encoded in binary. Same kind of thing as Wolfram rule numbering.gameoflifemaniac wrote:How does the MAP syntax work?
Code: Select all
x = 15, y = 15, rule = MAPARYXfhZofugWaH7oaIDogBZofuhogOiAaIDogIAAgAAWaH7oaIDogGiA6ICAAYAAaIDogIAAgACAAIAAAAAAAA
6b3o$6bobo$6bobo4$3o9b3o$o13bo$3o9b3o4$6bobo$6bobo$6b3o!
Where does the 61 come from?Rhombic wrote:In the same way, to make modifications yourself, choose a transition. Mine will be B7e(South).dvgrn wrote:This answer to a MAP-related question might also be useful to walk through. It's a little hard to wrap one's head around at first -- the position of each binary digit is itself a neighborhood pattern encoded in binary. Same kind of thing as Wolfram rule numbering.gameoflifemaniac wrote:How does the MAP syntax work?
101
101
111
which is in decimal 367 = 61*6+1
position 61 of the CGoL MAP is I (8 in decimal): 001000; add the 1 at position 1 = 011000 (decimal 24 --> base 64 is Y).
Switching at position 64 I for Y:Code: Select all
x = 15, y = 15, rule = MAPARYXfhZofugWaH7oaIDogBZofuhogOiAaIDogIAAgAAWaH7oaIDogGiA6ICAAYAAaIDogIAAgACAAIAAAAAAAA 6b3o$6bobo$6bobo4$3o9b3o$o13bo$3o9b3o4$6bobo$6bobo$6b3o!
The transition B7e(south) is encoded by the binary number 101101111, found by reading across the rows of the 3 by 3 grid of cells. This number in decimal is 367, so we need to look at the 367th bit of the MAP rule string. Since each character in this string takes up 6 bits, we need to divide 367 by 6. 367/6 is 61 with a remainder of 1, so we look at the 61st character of the rule string. This character is 'I', which encodes the binary string 001000. The relevant bit here is the second digit, and it is 0 because B7e(south) is not part of the rule and thus the 3 by 3 configuration produces an off cell. To make the configuration produce an on cell instead, we need to change this 0 to a 1, which changes the binary string to 011000, encoded by 'Y'. Thus, changing the I at position 61 to a Y adds the B7e(south) transition to the rule.gameoflifemaniac wrote:Where does the 61 come from?
Thanks very much! So different characters in the same position can mean the same, right?gameoflifeboy wrote:The transition B7e(south) is encoded by the binary number 101101111, found by reading across the rows of the 3 by 3 grid of cells. This number in decimal is 367, so we need to look at the 367th bit of the MAP rule string. Since each character in this string takes up 6 bits, we need to divide 367 by 6. 367/6 is 61 with a remainder of 1, so we look at the 61st character of the rule string. This character is 'I', which encodes the binary string 001000. The relevant bit here is the second digit, and it is 0 because B7e(south) is not part of the rule and thus the 3 by 3 configuration produces an off cell. To make the configuration produce an on cell instead, we need to change this 0 to a 1, which changes the binary string to 011000, encoded by 'Y'. Thus, changing the I at position 61 to a Y adds the B7e(south) transition to the rule.gameoflifemaniac wrote:Where does the 61 come from?
If I'm understanding the question right, no. Any change to the MAP string will change what happens in one of the 512 possible neighborhoods.gameoflifemaniac wrote:Thanks very much! So different characters in the same position can mean the same, right?
You can figure that out for yourself. Use Rhombic's script. Start with an all-OFF MAP stringgameoflifemaniac wrote:What would be the syntax for Wolfram 22?
Code: Select all
x = 1, y = 1, rule = MAPAAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
o!
#C [[ STOP 1023 THEME 8 AUTOSTART AUTOFIT HISTORYFIT THUMBNAIL THUMBSIZE 2 ]]Code: Select all
x = 1, y = 1, rule = MAPAAD//wAA//+AAP//AAD//4AA//8AAP//AAD//wAA//+AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//w
o!
#C [[ STOP 1023 AUTOSTART AUTOFIT ]]