Git Product home page Git Product logo

golpy's Introduction

GoLPy

GitHub license PyPI Code style: black

GoLPy is an efficient Conway's Game of Life implemented in Python using NumPy.

Example Output

The following GIF can be generated using the command:

life --demo glidergun --out glider_gun.gif --ppc 10 --pos TL -W60 -H40

The Gosper Glider Gun

Installation

pip install golpy

Usage

usage: life [-h] (-i GRID_INPUT | -d DEMO) [-o FILE | --debug-print]
            [-W WIDTH] [-H HEIGHT] [-M MAX_GEN] [--ppc PIXELS] [-P POSITION]
            [-p]

optional arguments:
  -h, --help            show this help message and exit
  -i GRID_INPUT, --in GRID_INPUT
                        Parse the initial grid from <GRID_INPUT>
  -d DEMO, --demo DEMO  Try one of the provided demos: one of 'glidergun' and
                        'glidergen'
  -o FILE, --out FILE   Place the output into <FILE>
  --debug-print         Print the generated frames directly to the terminal,
                        instead of saving them

  -W WIDTH, --width WIDTH
                        Width of the grid
  -H HEIGHT, --height HEIGHT
                        Height of the grid

  -M MAX_GEN, --max-gen MAX_GEN
                        Number of generations to simulate
  --ppc PIXELS          Set the width and the height of each cell to <PIXELS>
  -P POSITION, --pos POSITION
                        One of 'C', 'T', 'B', 'L', 'R', 'TL', 'TR', 'BL', and
                        'BR'

  -p, --profile         Measure the performance

Input Format

........................O
......................O.O
............OO......OO............OO
...........O...O....OO............OO
OO........O.....O...OO
OO........O...O.OO....O.O
..........O.....O.......O
...........O...O
............OO

Use . for a dead cell, O (chr(79)) for a live cell.

License

MIT

golpy's People

Contributors

imgbot[bot] avatar zeta611 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ericj974

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.