Read the previous generation
A cell’s eight neighbours determine its next state. The exhibit reads every row from the same generation and wraps the edges, so patterns can cross both strip boundaries and the edge of the board.
I implemented Conway’s Game of Life in Go and deployed it on AWS. The client sent the board over RPC, and the server calculated updates for assigned row ranges.
Explore the exhibitScrub through the generations. The rules use neighbours from the whole board, including cells across the highlighted row boundaries.
Scroll or swipe sideways · Arrow keys to scrub · Space to pause or resume
To update their boundary cells, two neighbouring workers can swap just their touching rows. A’s bottom row becomes B’s top halo, and B’s top row becomes A’s bottom halo. Each halo is a read-only copy from the previous generation.
Scroll or swipe sideways · Arrow keys to scrub · Space to pause or resume
A cell’s eight neighbours determine its next state. The exhibit reads every row from the same generation and wraps the edges, so patterns can cross both strip boundaries and the edge of the board.
The Go client sends the board, a worker number and the requested turn count. The server uses the worker number and thread count to determine which rows to calculate.
The client queries the running server for live-cell counts while it waits for the turn request to finish. The browser exhibit illustrates the row calculations and shows its own generation and population counters.