Welcome to Seagull!

PyPI Version Build Status Code Coverage License: MIT

A Python library for Conway’s Game of Life

pip install pyseagull

This framework allows you to create and simulate various artificial lifeforms and cellular automata easily: simply define your board, add your lifeforms, and execute the run command! It also provides a myriad of pre-made lifeforms while allowing you to create your own.

Why name it Seagull? Conway’s Game of Life is quite a mouthful, so I just refer to its acronym, CGoL. The word “seagull” is just a pun of that.

Conway’s Game of Life is considered a zero-player game: you simply set-up your initial configuration on the board and observe how it evolves through time.

Simulate your first lifeforms in a few lines of code:

import seagull as sg
from seagull.lifeforms import Pulsar

# Initialize board
board = sg.Board(size=(19,60))

# Add three Pulsar lifeforms in various locations
board.add(Pulsar(), loc=(1,1))
board.add(Pulsar(), loc=(1,22))
board.add(Pulsar(), loc=(1,42))

# Simulate board
sim = sg.Simulator(board)
sim.run(sg.rules.conway_classic, iters=1000)

Optionally, you can animate the simulation by running sim.animate():

https://imgur.com/sgCrP9f.gif

Indices and tables