https://github.com/andreasabel/sbv-quarter-circle-puzzle
Solve a grid-based partitioning puzzle with SMT using Haskell's sbv library
https://github.com/andreasabel/sbv-quarter-circle-puzzle
Last synced: 9 months ago
JSON representation
Solve a grid-based partitioning puzzle with SMT using Haskell's sbv library
- Host: GitHub
- URL: https://github.com/andreasabel/sbv-quarter-circle-puzzle
- Owner: andreasabel
- Created: 2024-06-06T07:24:17.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-28T18:23:39.000Z (almost 2 years ago)
- Last Synced: 2025-05-06T14:01:45.383Z (about 1 year ago)
- Language: Haskell
- Homepage:
- Size: 55.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Using Haskell library `sbv` to solve the second puzzle given here:
https://www.cse.chalmers.se/~sattler/retreat-puzzle-2024.pdf
`sbv` is a front-end to SMT provers like `z3`.
Files:
- [Puzzle definition](src/Val.hs)
- [Board](src/Board.hs) and constraints concerning correct division and coloring of the board.
- [Correct sums](src/Valuation.hs)
- [Entry point](main/Main.hs)
See comments for the representation of the board and the constraints that classify valid solutions.
`stack run` solves the puzzle via a `z3` call.
Warning! On my machine (2016 Intel macBook) it took almost one hour.