<div dir="ltr">Thanks!<div>I see now how it works, thank you.</div><div><br></div><div>Hernan.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 21, 2023 at 5:48 AM Stéphane Rollandin <<a href="mailto:lecteur@zogotounga.net">lecteur@zogotounga.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>
> I can not map <br>
> that implementation to the rules of the game... Can someone explain to <br>
> me or point me to a paper/description of why that implementation works?<br>
<br>
There is the Byte paper, around<br>
<a href="https://archive.org/details/byte-magazine-1981-08/page/n205/mode/2up?view=theater" rel="noreferrer" target="_blank">https://archive.org/details/byte-magazine-1981-08/page/n205/mode/2up?view=theater</a><br>
<br>
The figure there shows how ancilliary forms are used to count, in <br>
parallel, the number of neighbors for each point in the pattern.<br>
<br>
For each direction in the Moore neighborood, the pattern is shifted and <br>
these eight shifted grids are combined together.<br>
<br>
This is an addition in base two, and we need to count up to eight, so <br>
the algorithm uses three forms (nbr1, nbr2 and nbr4) to store the <br>
corresponding bits, and two other forms (carry2 and carry4) to store the <br>
bits carried from one bit to the next (so here from nbr1 to nbr2, and <br>
from nbr2 to nbr4), just as you need to do when performing an addition <br>
by hand.<br>
<br>
The last step (the last four lines in #nextLifeGeneration from the Byte <br>
paper) generates the next pattern from nbr1, nbr2 and nbr4. The rules of <br>
the Game of Life are encoded here in the successive combination rules, <br>
in a nifty and quite obfuscated way that I did not even tried to <br>
comprehend.<br>
<br>
Stef<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-size:small"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal"><span style="font-weight:bold">Hernán Wilkinson</span><br>Agile Software Development, Teaching & Coaching</span></font></span></span></strong></span></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Phone: +54-011</span></font></span></span></strong></span><font face="tahoma, sans-serif" size="2">-4893-2057</font></div><div style="font-size:12.8px"><strong style="font-family:tahoma,sans-serif;font-size:xx-small"><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Twitter: @HernanWilkinson</span></font></span></span></strong></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">site: <a href="http://www.10pines.com/" style="color:rgb(17,65,112)" target="_blank">http://www.10Pines.com</a></span></font></span></span></strong></span></div><div style="font-size:12.8px"><font face="tahoma, sans-serif"><span style="border-collapse:collapse">Address: Alem 896</span></font>, Floor 6, Buenos Aires, Argentina</div></div></div></div></div></div></div></div>