Skip to content

jubnzv/gol-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gol-solver

A SAT forward solver for John Conway's "Game of Life" based on z3.

Usage

You will need Python 3. Initialize virtual environment and install the dependencies:

virtualenv venv --python=/usr/bin/python3
venv/bin/activate
pip3 install -r requirements.txt

Then try to run the solver on the examples:

python3 solver.py examples/field1.txt
python3 solver.py examples/field2.txt

Field format

The first line describes field settings in the following format: <width> <height> <number of transitions>.

Subsequent lines describe the field where:

  • . is a dead cell
  • * is an alive cell

References

  1. TAOCP 4A describes the basic idea behind solving of the Game of Life in chapter 7.2.2.2.
  2. flopp/gol-sat – the implementation of the similar solver using C++ and MiniSAT

About

A solver for John Conway's "Game of Life" based on z3.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages