Mine has to be this continuous version that makes pretty crazy looking creatures: https://chakazul.github.io/Lenia/JavaScript/Lenia.html.
It was also featured on HN:
life ← {⊃1 ⍵ ∨.∧ 3 4 = +/ +⌿ ¯1 0 1 ∘.⊖ ¯1 0 1 ⌽¨ ⊂⍵}
The video runs you through it, even if it doesn't make it any clearer for non-apl'ers.https://en.wikipedia.org/wiki/Hashlife
My personal favorite has to be the one I made in x86 assembly ~30 years ago. I didn't know about hash life at the time, but still, it ran pretty fast. I seem to remember I used page flipping and moved the start of video memory each iteration. Or something like that.
(defn neighbors [[x y]] #{[(dec x) (dec y)] [(dec x) y] [(dec x) (inc y)] [ x (dec y)] [ x (inc y)] [(inc x) (dec y)] [(inc x) y] [(inc x) (inc y)]})
(defn count-neighbors [world cell] (count (set/intersection (neighbors cell) world)))
(def rules #{[true 2] [true 3] [false 3]})
(defn live [world cell] (contains? rules [(contains? world cell) (count-neighbors world cell)]))
(defn evolve [world] (into #{} (filter #(live world %) (reduce set/union (map neighbors world)))))
Full source: https://github.com/twpayne/life/blob/master/clojure/src/life...
https://colab.research.google.com/github/norvig/pytudes/blob...
Description: https://www.phatcode.net/res/224/files/html/ch18/18-01.html
Code: https://www.phatcode.net/res/224/files/html/ch18/18-03.html
Hashlife is far superior so while Qlife was interesting it wasn't the best implementation.
Previously: https://news.ycombinator.com/item?id=39799755
(Ope, ninja'd)
I'm not saying this is mechanically interesting (it's just a simple filter) or will change your life or anything, but I do remember spending a lot of time tinkering with and watching that particular implementation.
Best looking? Lowest resource utilization? Smallest code size? Fastest? Largest playing field? etc.
https://c0stya.github.io/articles/game_of_life.html
### The code ###
import numpy as np
from scipy.signal import convolve2d
field = np.random.randint(0, 2, size=(100, 100)) # 100x100 field size
kernel = np.ones((3, 3))
for i in range(1000): # 1000 steps
new_field = convolve2d(field, kernel, mode="same")
field = (new_field == 3) + (new_field == 4) * field
Maybe someone on HN remembers it and can tell me its name?
CPU are very different these days, but the process he goes through is essentially unchanged.
Here's the game of life running in the game of life: https://youtu.be/xP5-iIeKXE8?si=7NslTsVlW0USjQFw - that one uses Golly.
(In case it's not super clear, I'm kinda jokin' here...)
https://chatgpt.com/canvas/shared/67a71a9f57bc819185cade8f59...
At the time I was doing a lot of simulation work, so methods for bridging discrete and continuous domains were interesting.
https://latedev.wordpress.com/2011/06/25/a-poker-chip-comput...
The most mind blowing algorithm has to be hashlife though. Well worth studying for those aha moments.
I like control-shift-r to refresh the page.
(may include SAT solvers and traces of black magic)
https://x.com/deadfoxygrandpa/status/1819204922271060440
screenshot of it here: https://i.imgur.com/Iq9XXi4.jpeg
I believe it implements Bill Gosper's hashlife quadtree algorithm (already mentioned elsewhere in the comments here).
Xlife is unbelievably fast.
https://en.wikipedia.org/wiki/Flag_of_Belarus#/media/File:Be...
Edit: not really. But what a wasted opportunity. Come on, State Committee for Standardization of the Republic of Belarus, what are you doing all day?