
Ask HN: Share your Game of Life implementations - anderspitman
I know John Conway wasn&#x27;t always fond of being known for GoL[0], but that doesn&#x27;t make it any less important to me. I suspect for many, Life represents their first magical experience with programming. It can give the sense that you&#x27;re glimpsing a connection to the deeper underpinnings of the universe. For me personally, Life has played a big role in my love of automata, and simulations in general.<p>I thought it would be fun for everyone to share their personal implementations of Life. Here are my meager contributions:<p>Recent hand-written wasm implementation (ui incomplete): https:&#x2F;&#x2F;github.com&#x2F;anderspitman&#x2F;wasm-life<p>Basic JavaScript&#x2F;CSS intended to be used as self-contained animated icons: https:&#x2F;&#x2F;anderspitman.net&#x2F;apps&#x2F;golicons&#x2F;<p>WebGL (for simulation and visualization) (unfinished): https:&#x2F;&#x2F;github.com&#x2F;anderspitman&#x2F;mogol&#x2F;tree&#x2F;webgl-sim<p>Two of my favorites that I didn&#x27;t do:<p>Life in Life: https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=xP5-iIeKXE8<p>Life in WebGL: https:&#x2F;&#x2F;www.shadertoy.com&#x2F;view&#x2F;Xd33WS<p>[0]: https:&#x2F;&#x2F;youtu.be&#x2F;E8kUJL04ELA
======
BZH314
Twitch Plays Conway's Game Of Life is back, in memory of John Conway [1]

It's a multiplayer implementation you play through the Twitch chat by sending
commands (!ON, !OFF, !RLE, !HELP, ...).

The list of commands and help: [2]

You can use/learn more complex patterns with RLEs (Run Length Encoded), where
a "o" means alive, "b" means dead and "$" is carriage return.

Example of RLE command for a glider: !rle bob$2bo$3o! 0.0 # Create a glider at
coordinates 0,0

TPCGOL has a database of 446 patterns (Sir Robin, Gosper Glider Gun, ..), so
the equivalent command for the glider above is:

!glider 0.0

A slideshow of all 446 patterns (still lifes, oscillators, guns and
spaceships) is available here:
[https://www.youtube.com/watch?v=u4XgALyX6w8](https://www.youtube.com/watch?v=u4XgALyX6w8)

You can find more patterns on the Conway Life wiki [3]

There's also a Battle Royale mode you can start with !PLAY [4]

In Battle Royale mode, the rules are similar to Fortnite: join a game with
!PLAY, !THANK the bus driver, and try to be the last one to have cells alive
as the storm shrinks.

RIP John Conway

\----

[1] [https://www.twitch.tv/bzh314](https://www.twitch.tv/bzh314)

[2]
[https://bzh314.com/twitch_plays_conway_game_of_life/](https://bzh314.com/twitch_plays_conway_game_of_life/)

[3]
[http://www.conwaylife.com/wiki/Main_Page](http://www.conwaylife.com/wiki/Main_Page)

[4]
[https://bzh314.com/twitch_plays_conway_game_of_life/#play](https://bzh314.com/twitch_plays_conway_game_of_life/#play)

------
ArneVogel
I played around a lot with cellular automata over a year ago and made the
general case for game of life [1] but also other variants [2] and [3] which I
consider especially beautiful.

[1] [https://www.arnevogel.com/life-like-cellular-
automaton/](https://www.arnevogel.com/life-like-cellular-automaton/) [2]
[https://www.arnevogel.com/brians-brain-cellular-
automaton/](https://www.arnevogel.com/brians-brain-cellular-automaton/) [3]
[https://www.arnevogel.com/cyclic-cellular-
automaton/](https://www.arnevogel.com/cyclic-cellular-automaton/)

------
waspentalive
Back in the days of s100 computers, I had a poly 88. I wrote a game-of-life
that used the video memory as the cell array. characters meant a dead cell
that next gen would be live, dead -> dead, live -> dead, live->live - one pass
replaced the current generation with one of those 4 chars. The second pass
would resolve the chars back to Live "@" and dead "." cells. 8080 Machine code
(hand assembled). It would do about 1 generation a second. The life array was
40x25..

------
Raed667
A very rough JavaScript implementation I did this morning after looking at the
Wikipedia page

[https://gist.github.com/RaedsLab/e4d5eed8f1d7e0b90f407bdef71...](https://gist.github.com/RaedsLab/e4d5eed8f1d7e0b90f407bdef710c871)

------
kapilkaisare
This is something I put together 5 years ago:

[https://github.com/kapilkaisare/game-of-
life](https://github.com/kapilkaisare/game-of-life)

