Header image for Game of Life

Game of Life

Prompt

Write a Python program that implements Conway's Game of Life. The program should include a grid of cells that evolve according to the standard rules (a live cell with 2 or 3 live neighbors stays alive, a dead cell with exactly 3 live neighbors becomes alive, otherwise the cell dies). Allow the user to specify the grid size and initial configuration, and display the grid's evolution over time, either in the console or with a simple graphical interface. Include comments to explain the code.

OpenAI logoOpenAI
o3
Drag to resize
Drag to resize
OpenAI logoOpenAI
GPT-4.1
Drag to resize
Drag to resize
Drag to resize
Drag to resize
Drag to resize