Skip to main content

An example package of lamdoanduc

Project description

project-python Project 1 - Game of life

Game of life is a cellular automaton devised by John Conway in 70's: http://en.wikipedia.org/wiki/Conway's_Game_of_Life

The game consists of two dimensional orthogonal grid of cells. Cells are in two possible states, alive or dead. Each cell interacts with its eight neighbours, and at each time step the following transitions occur:

Any live cell with fewer than two live neighbours dies, as if caused by underpopulation Any live cell with more than three live neighbours dies, as if by overcrowding Any live cell with two or three live neighbours lives on to the next generation Any dead cell with exactly three live neighbours becomes a live cell The initial pattern constitutes the seed of the system, and the system is left to evolve according to rules. Deaths and births happen simultaneously.

In a git repository implement the Game of Life using Numpy. Try first 32x32 square grid and cross-shaped initial pattern:

Try also other grids and initial patterns (e.g. random pattern). Try to avoid for loops. For visualization you ca use Matplotlib: import matplotlib.pyplot as plt plt.imshow(array)

Make a pip package out of it including dependencies. Add CI using Travis, testing installation from pip and running one game of 1000 iterations checking that it matches a pre known pattern.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gameoflife-lam-0.0.1.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gameoflife_lam-0.0.1-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file gameoflife-lam-0.0.1.tar.gz.

File metadata

  • Download URL: gameoflife-lam-0.0.1.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for gameoflife-lam-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6ae6d3ecfe42a411bf650f0970f5dce0a5363dc5201448d714895c6e9d2057e2
MD5 0c1bb383eec935830ba598bb786d702b
BLAKE2b-256 3067eacb6b6d6571b554ceff957beab19b60c33715c53328e7cecd4020f67504

See more details on using hashes here.

File details

Details for the file gameoflife_lam-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: gameoflife_lam-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for gameoflife_lam-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b3f4428ba17b1d501649a5deef27caef1de7758deb2f9a7e3e172b65842c1c2
MD5 df50201c52e838e057cbee6adf0fee24
BLAKE2b-256 236434262c65eba300537ba2f7eb691fe19c1d3b2dbef32c03fb20b5a878b5c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page