Simulation & measurement

Interactive Conway’s Game of Life Simulator

This Conway’s Game of Life simulator runs on a 300 × 300 cellular grid. You can toggle cells by hand or stamp classic still lifes, oscillators, spaceships, and a Gosper glider gun. Let the generations run continuously or move through them one step at a time. The canvas also supports panning, zoom, speed control, random starting states, and light or dark themes.

What it does

  • Toggle individual cells or stamp reusable patterns including blocks, beehives, blinkers, pulsars, gliders, lightweight spaceships, and a Gosper glider gun.
  • Run continuously, pause, or step forward and backward through the recorded simulation history.
  • Pan across a 300 × 300 toroidal grid and zoom from a broad overview to individual cells.
  • Change simulation speed, generate a random starting state, clear the board, and switch between light and dark themes.
  • Rotate pattern brushes in 90-degree increments before placing them.

How to use Conway’s Game of Life

  1. Create a starting pattern

    Keep the Toggle Cell brush to draw one cell at a time. For a larger start, pick a still life, oscillator, spaceship, or gun from the brush menu.

  2. Place and orient cells

    Click the grid to place the selected cell or pattern. Press Q or E to rotate a pattern brush before stamping it.

  3. Navigate the grid

    Drag to pan, use the mouse wheel or Zoom control to change scale, and position the pattern you want to observe.

  4. Run the simulation

    Press Play or the space bar for continuous evolution, or use the arrow controls and arrow keys to inspect one generation at a time.

  5. Reset or experiment

    Adjust speed, switch theme, create a random population, or clear the grid and begin a new experiment.

Formats, compatibility, and limits

Inputs

  • Mouse or trackpad clicks that toggle cells or place a selected pattern.
  • A brush selection and optional 90-degree rotation.
  • Playback speed, zoom, pan position, theme, and playback controls.
  • Optional random population generated in the browser.

Outputs

  • A live Canvas 2D simulation of successive Game of Life generations.
  • A current generation counter and an in-memory history that supports stepping backward while paused.
  • No image, pattern, or state export is currently provided.

Compatibility

  • Designed primarily for a desktop mouse or trackpad and keyboard.
  • Requires Canvas 2D and JavaScript; the simulation runs entirely on the page.
  • The full-screen grid is responsive, but the desktop control panel and mouse-oriented gestures may be awkward on small touch screens.

Known limits

  • The world has a fixed 300 × 300 grid whose opposite edges wrap around, so it is not an infinite plane.
  • History is kept only in memory and is capped at 500 recorded states.
  • Patterns cannot currently be imported, saved, shared, or exported as files.
  • Simulation cost grows with the fixed full-grid update, regardless of how many cells are alive.

Privacy and processing

  • Cell states, history, settings, and random patterns remain in page memory and are not uploaded by the simulator.
  • The tool does not use local storage or IndexedDB, so refreshing or leaving the page clears the current world.
  • No account or personal input is required.

How this Game of Life simulation evolves

For every generation, the simulator counts the eight neighbours around each cell. A living cell survives with two or three neighbours. A dead cell is born with exactly three. Coordinates wrap across all four edges, so the finite grid behaves like a torus. The React interface keeps as many as 500 snapshots for backward stepping. Canvas 2D draws the cells, placement preview, grid, and slowly moving background gradient.

Questions about Conway’s Game of Life

What are Conway’s Game of Life rules?

A live cell survives when it has two or three live neighbours and dies otherwise. A dead cell becomes alive when it has exactly three live neighbours. Every cell updates from the same previous generation.

Does the grid have an edge?

The displayed world is finite, but the coordinates wrap. Move past the left edge and you reach the right; move past the top and you reach the bottom. Patterns can interact across those opposite boundaries.

Can I save or export a pattern?

Not in the current simulator. The grid and its history exist only for the current page session and are cleared when the page reloads.

Which keyboard controls are available?

Space toggles play and pause, Left and Right step through generations while paused, and Q or E rotates the selected pattern brush by 90 degrees.