【Implementation】P2P Life Game: Self-replicating, democratic network
There’s no central hub or master clock. Each node only talks to its neighbor, and the Game of Life keeps ticking. Browser tabs connect directly to each other without a server—and it actually works.
Even without a central hub, local rules and equal neighbors keep the whole moving. We’ll test that with a tiny implementation.
Implementation A: Asynchronous Cell Agent
Each cell on the board is an independent tiny agent. There’s no global clock or board. A cell advances its generation once its eight neighbors have caught up. The order is random each turn. Yet the outcome matches that of a standard synchronous Game of Life exactly (see the “Verification” below).
booting…
Light-blue marks the board of the overall minimal generation. Orange marks cells that are ahead (in a generation beyond the rest). The very emergence of a lead gap proves there’s no global clock.
Implementation B: Tile Peer (P2P between tabs).
Divide an infinite board into 32 × 32 tiles, with each browser tab handling a single tile. Adjacent tabs exchange only the edge cells directly. No server is involved (we use the browser’s BroadcastChannel).
- Click “Open in a new tab” below.
- A new tab automatically takes the next seat beside an existing tab.
- Place a glider on one side. Crossing the tab boundary, it moves to the neighboring tab.
connecting…
Protocol (key points).
| Message | Content |
|---|---|
| who | “Is anyone there?” Existing peers send back my endpoint. |
| edge | Own tile coordinates, generation g, edge rows and columns (the four sides and four corners) |
- Each tile advances to generation g+1 once all the edges of generation g of its living neighbor are present (local synchronization).
- If the neighbor is silent for three seconds, we treat it as a dropout and mark that side as a dead cell (jelly-like property: the rest keeps moving even if someone leaves).
- Editing incorporates changes at generational boundaries while preserving determinism.
Verification
| Implementation | Verification | Result |
|---|---|---|
| A | On a random initial board, across roughly 3,000 updates, each time it was compared against a synchronous reference implementation. | Mismatch 0 |
| B | Using two tiles, compare a glider and random cells that cross the boundary over 60 generations against a reference implementation (single board). | Mismatch 0 |
Verification was carried out on Node.js, directly on the code of this implementation.
The true meaning of “self-replication”
- Replication = participation and forking: The source is public. Anyone can spin up their own node, tweak the rules, and branch off (right to fork: freedom to leave).
- Blueprints get duplicated: von Neumann’s self-replication and the same architecture (von Neumann: Self-Replicating Machines).
- Free to exit: Close the tab and it vanishes. The rest keep moving.
Next phase (unimplemented).
| Stage | Content | Challenge |
|---|---|---|
| 1 | Directly connect browsers on separate devices via WebRTC. | You need a first-hand connection handshake (signaling). If you use a manual copy-paste method, no server is required. |
| 2 | Record part of the board on IPFS so anyone can recreate it. | IPFS and the Meaning of Content Addressing |
| 3 | A Game-of-Life-style democratic experiment that changes the rules by vote | Democracy via P2P: Three layers, Realizing democracy through technology |
Related Topics
Read via a Wikipedia mirror (wikipedia-is-dead.com)
Implementation side: Manifest ↗ / Network ↗ / Rescuing Deleted Articles ↗ / Join ↗