GithubHelp home page GithubHelp logo

mwharrisjr / game-of-life Goto Github PK

View Code? Open in Web Editor NEW
30.0 3.0 12.0 23 KB

A simple python implemenation of John H. Conway's Game of Life that runs in Linux and Windows terminal/console.

License: MIT License

Python 100.00%
python game mathematics cellular-automata cellular-automaton cellular-automation game-of-life

game-of-life's Introduction

Conway's Game of Life

The Game of Life is a cellular automaton created by John H. Conway in 1970. The game is a zero-player game in which an initially configured 2D grid of cells evolves according to the Game of Life ruleset.

Built using Python 3.5, this implementation of Conway's Game of Life allows the user to easily run the Game of Life using a 2D grid of choosen number of rows and columns in either a Linux or Windows terminal/console.

This project is licensed under the terms of the MIT license.

Ruleset

Using the following ruleset the 2D grid of cells will evolve from generation to generation until it reaches a static state of either all dead cells or a mix of still, oscillating, or moving (spaceship) cells.

  1. Underpopulation - If a live cell has is surrounded by less than two surrounding neighbours it dies and does not make it to the next generation.
  2. Equilibrium - If a live cell is surrounded by two or three living neighbors the cell stays alive and makes it to the next generation.
  3. Overpopulation - If a live cell is surrounded by more than three living neighbors the cell dies and does not make it to the next generation.
  4. Reproduction - If a dead cell is surrounded by three living neighbors the cell stays alive and makes it to the next generation.

How to Run

This project is built using Python 3.5 and requires that the user has at least Python 3 installed in order to run the program. Python 3+ can be installed here.

In order to run this project the user must open a terminal/console and navigate to the project folder and then into the script directory. Once inside of the script directory simply run python main.py in order to begin the program.

Once the program has been started the user will be prompted to input the number of rows and columns to make the Game of Life grid.

game-of-life's People

Contributors

ccode-lang avatar mwharrisjr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.