Git Product home page Git Product logo

conways-game-of-life's Introduction

Conway's Game of Life

license python

This project is a Python personal implementation of the well-known "Game of Life", written using object-oriented programming. Although it is not said to be fully optimized, multithreading is being used to speed up the program, and other methods such as multiprocessing or the use of charm4py are currently being implemented.

Requirements

Before running the code, you should consider using a virtual environment. To do so, you can either use pip or conda :

Using pip :

  • verify that pip is installed :
$ pip --version

if not, install it.

When it is done, let's continue the installation :

  • install pipenv :
$ pip install --user pipenv
  • once it is installed and well configured, run your environment :
$ pipenv shell

Using conda :

  • verify that conda is installed :
$ conda --version

if not, install Anaconda.

  • then, create your conda environment and launch it:
$ conda create -n my_env
$ conda activate my_env

Run the code

Before you can have some fun "playing" Conway's Game of Life, you should at least know how to run the code. So here are all the commands yet implemented.

Main commands :

  • choose the grid size (int, default to 100) :
$ python -m my_module -gs grid_size
  • choose the speed (float, default to 0.005), which is the time between two updates :
$ python -m my_module -gs grid_size -s speed

Choose your start :

  • random init (bool, default to False if not chosen) and its length (int, default to 10) :
$ python -m my_module -gs grid_size -ri -ril random_init_length
  • oscillators :
$ python -m my_module -gs grid_size -bc
$ python -m my_module -gs grid_size -bk
$ python -m my_module -gs grid_size -t
$ python -m my_module -gs grid_size -ggg

What's next ?

The future of this project is to, once significantly/fully optimized, try to make some PyQT in order to create a "Conway's Game of Life app". Thanks for reading this far and stay tuned !

conways-game-of-life's People

Contributors

raphaellndr avatar etiennelndr 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.