Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 834 Bytes

File metadata and controls

29 lines (19 loc) · 834 Bytes

Python Implementation of Gosper's hashlife algorithm. See johnhw.github.io/hashlife for a full explanation.

An equivalent plain ISO C implementation of the Python code is available in iso-c/

Usage:

from hashlife import construct, advance, expand
from lifeparsers import autoguess_life_file
from render import render_img

pat, _ = autoguess_life_file("lifep/GUN30.lif") 
node = construct(pat) # create quadtree
node_30 = advance(node, 30) # forward 30 generations
pts = expand(node_30) # convert to point list
render_img(pts) # render as image

C implementation

See iso-c/README.md for details.

Credits

Life patterns in lifep/ collected by Alan Hensel.