Giter Site home page Giter Site logo

conwaysgameoflife's Introduction

Conway's Game of Life - An oversimplified version though

Use function "play" to run the game.

play function has these parameters

board - 2 dimensional array. The output will be captured in this. The bigger the board is, the more interesting the output gets.
state - 2 dimensional array. The initial state of the board. Watch the fun when you change values on this.
timeline - Number of times the conway propagation needs to run/repeat. This is equivalent to time in the realistic sense.

States of the cells in each array

0 - dead organism
1 - live organism

Running the program

git clone https://github.com/nav064/conwaysgameoflife.git

cd conwaysgameoflife

npm run dev

Limitations

  1. The board and state are equi-dimensional. 10X10 in this case. We can generalize to nXn.
  2. How the organism lives or dies does not take into account any practical features. It is only a statistical representation inspired by Conway's Game rule.

Please feel free to comment/test/reuse/modify.

The eventual question I had is "Are we just a Conway's game of our genes?"

conwaysgameoflife's People

Contributors

nav064 avatar

Watchers

 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.