Conway’s Game of Life Conway’s Game of Life

Conway’s Game of Life Rules

🧩 Basic Setup

  • The simulation runs on a grid of square cells.
  • Each cell can be in one of two states:
    • Alive (filled square)
    • Dead (empty square)
  • The grid evolves in steps (called generations).
  • Each cell looks at its 8 neighbors (horizontal, vertical, diagonal) to decide its next state.

📜 Rules (applied to each cell, every generation)

1. Underpopulation

If a living cell has fewer than 2 living neighbors → it dies.

2. Survival

If a living cell has 2 or 3 living neighbors → it stays alive.

3. Overpopulation

If a living cell has more than 3 living neighbors → it dies.

4. Reproduction

If a dead cell has exactly 3 living neighbors → it becomes alive.

🔁 How a Generation Works

  1. Count the alive neighbors for each cell.
  2. Apply the 4 rules above.
  3. Update all cells simultaneously (no in-between states).

🎯 Notes

  • The rules are deterministic — same input always gives same output.
  • The game has no user interaction during runtime — set the start, then watch.
  • A small initial pattern can lead to stable, oscillating, or expanding behavior.

🧠 Extra Concepts (Optional)

🔁 Still Lifes

Patterns that do not change over time.
Example: Block, Beehive.

⏳ Oscillators

Patterns that repeat every N generations.
Example: Blinker (N = 2), Toad (N = 2), Pulsar (N = 3)

🚀 Spaceships

Patterns that move across the grid over time.
Example: Glider, Lightweight Spaceship

✅ Summary (Quick Reference)