Skip to content

Louiszk/GameofLife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Conway's Game of Life

This project is a web-based implementation of Conway's Game of Life using Dash and Plotly. Users can interactively set the initial state of the game board and start the simulation to see how the cells evolve over time.

Table of Contents

Overview

Conway's Game of Life is a cellular automaton devised by the British mathematician John Horton Conway in 1970. It's a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input. Players create an initial configuration and observe how it evolves.

Features

  • Interactive grid to set initial live cells.
  • Start and stop the simulation.
  • Visualization of the evolving generations of cells.
  • Easy-to-use interface.

Usage

  1. Open your web browser and go to Conway's Game of Life.
  2. Click on the grid to set the initial live cells. Click again on a cell to toggle its state (alive/dead).
  3. Click the "Start" button to begin the simulation.
  4. Watch how the cells evolve over time according to the rules of Conway's Game of Life.

How It Works

Rules

The game is played on a grid of cells, each of which can be alive or dead. The state of the grid evolves in steps, with the following rules:

  1. Birth: A dead cell with exactly three live neighbors becomes a live cell.
  2. Survival: A live cell with two or three live neighbors stays alive.
  3. Death: In all other cases, a cell dies or remains dead.

Implementation

  • Dash and Plotly: Used to create the interactive web interface and visualize the grid.
  • Numpy: Used for efficient grid manipulation and calculation of the next generation of cells.

Credits

This application was fully written by GPT-4, the language model developed by OpenAI. (I just added one line to the code. Wrote the requirements and deployed it with Render)


Enjoy playing Conway's Game of Life!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages