Conway's Game of Life

Conway's Game of Life

Today's #30DayMapChallenge is Cell. For this challenge I've created an interactive version of Conway's Game of Life that turns the entire globe into a dynamic cellular automaton.

Conway’s Game of Life is a mathematical simulation created by British mathematician John Conway in 1970. It’s not a game in the traditional sense - there’s no winning or losing - but a set of rules that determine how cells live, die, or are born on a grid:

  • Any live cell with 2 or 3 live neighbors survives.
  • Any dead cell with exactly 3 live neighbors becomes alive.
  • All other cells die or remain dead.

Despite these simple rules, the system can generate incredibly complex and beautiful patterns over time. It’s a fascinating way to explore emergent behavior and see how local interactions lead to global patterns.

Unlike most implementations, our map projects Conway’s Game of Life onto a global 0.5° x 0.5° grid, where each cell represents a small area of the Earth. The grid covers the entire planet:

  • Longitude: -180° to +180°
  • Latitude: -90° to +90°
  • Total grid: 360 rows × 720 columns

This means every point on Earth is a cell in the simulation, evolving in real time according to its neighbors. The result is a constantly shifting pattern of alive and dead cells across the globe.

How It Works

  • Grid Initialization: Each cell has a 20% chance of starting alive.
  • Neighbor Counting: For each cell, we check all eight surrounding cells to determine its fate.
  • Rules Application: The rules of Conway’s Game of Life decide if each cell survives, dies, or is born.
  • Rendering: Alive cells are drawn on a transparent canvas overlay, so you can still pan and zoom the globe freely.

You can also pause, play, step, and reset the simulation, adjust the speed, and even modify the rules for survival and birth, giving you full control over the behavior of the world.

Comments

Popular Posts