Efficient Conway's Game of Life using NumPy
Project description
GoLPy
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
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
golpy-0.2.0.tar.gz
(5.9 kB
view details)
Built Distribution
golpy-0.2.0-py3-none-any.whl
(6.4 kB
view details)
File details
Details for the file golpy-0.2.0.tar.gz
.
File metadata
- Download URL: golpy-0.2.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.5 Linux/5.4.0-1036-gcp
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5199a1144aaa719dcfa325dd2572a178869a71d801e79147b0e6a3d57fae640b |
|
MD5 | 30aa490ca627e055334b4203c7a9b19b |
|
BLAKE2b-256 | 67fcd63e01f2ad6a5c94de049c11678463e59fce9cf8c724d7e9fd27650f11ff |
File details
Details for the file golpy-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: golpy-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.5 Linux/5.4.0-1036-gcp
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55b4bc3e0e351778c6be493df81e32a2e29b7e78e321b09678c04ab8071ac02f |
|
MD5 | 7e6fe492e1d8dd5860c4f1504e6f1a19 |
|
BLAKE2b-256 | a01e8f02c6d7978223c3c7d8dd003d0bae26117e47bd8a6b3c6c6eaa5eae25cd |