Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jubnzv/gol-solver
A solver for John Conway's "Game of Life" based on z3.
https://github.com/jubnzv/gol-solver
game-of-life python z3 z3py
Last synced: 27 days ago
JSON representation
A solver for John Conway's "Game of Life" based on z3.
- Host: GitHub
- URL: https://github.com/jubnzv/gol-solver
- Owner: jubnzv
- License: mit
- Created: 2021-01-15T10:09:40.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-15T10:25:49.000Z (almost 4 years ago)
- Last Synced: 2024-11-29T03:39:31.864Z (about 1 month ago)
- Topics: game-of-life, python, z3, z3py
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```bash
virtualenv venv --python=/usr/bin/python3
venv/bin/activate
pip3 install -r requirements.txt
```Then try to run the solver on the examples:
```bash
python3 solver.py examples/field1.txt
python3 solver.py examples/field2.txt
```## Field format
The first line describes field settings in the following format: ` `.
Subsequent lines describe the field where:
+ `.` is a dead cell
+ `*` is an alive cell## References
1. [TAOCP 4A](https://www.amazon.com/Art-Computer-Programming-Combinatorial-Algorithms/dp/0201038048) describes the basic idea behind solving of the Game of Life in chapter 7.2.2.2.
2. [flopp/gol-sat](https://github.com/flopp/gol-sat) – the implementation of the similar solver using C++ and MiniSAT