https://github.com/scriptprivate/zogram
A command-line Nonogram (Picross) puzzle solver powered by the Z3 SMT engine.
https://github.com/scriptprivate/zogram
Last synced: 11 months ago
JSON representation
A command-line Nonogram (Picross) puzzle solver powered by the Z3 SMT engine.
- Host: GitHub
- URL: https://github.com/scriptprivate/zogram
- Owner: scriptprivate
- Created: 2025-06-30T23:37:23.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-06-30T23:50:18.000Z (12 months ago)
- Last Synced: 2025-07-01T00:37:19.707Z (12 months ago)
- Language: Python
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```
FILE: README.MD
DESC: Instructions for zogram.py
# ===================
# 1. PREREQUISITES
# ===================
# - Python 3.x
# ===================
# 2. SETUP
# ===================
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ pip install z3-solver numpy Pillow
# ===================
# 3. EXECUTION
# ===================
(venv) $ python zogram.py
# --- EXPECTED OUTPUT (TERMINAL) ---
# [/] Solution found!
# [/] Image saved as checkmark.png
# [/] The solution is UNIQUE.
# ------------------------------------
# A file `checkmark.png` is created.
# An image window opens.
# ===================
# 4. CUSTOM PUZZLE
# ===================
# 1. Edit `if __name__ == '__main__':` block in `zogram.py`.
# --- BEFORE ---
# rows = [
# [], [4], [6], [2, 2], [2, 2],
# [6], [4], [2], [2], [2], []
# ]
# cols = [
# [], [9], [9], [2, 2], [2, 2],
# [4], [4], []
# ]
# solve_nonogram(rows, cols, "checkmark.png", scale=30)
# ----------------
# --- AFTER (EXAMPLE) ---
# rows = [[1, 1], [3], [1, 1]]
# cols = [[1, 1], [3], [1, 1]]
# solve_nonogram(rows, cols, "x_puzzle.png", scale=40)
# -----------------------
# 2. Save the file and re-run the execution command.
```