mirror of
https://github.com/jrpotter/blockables-generator.git
synced 2026-09-03 01:11:27 +00:00
Scripts for generating Blockables puzzles.
https://www.blockables.app
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| data | ||
| generated | ||
| .gitignore | ||
| analyze-puzzles.py | ||
| download-puzzles.py | ||
| generate-puzzles.py | ||
| README.md | ||
| requirements.txt | ||
| utils.py | ||
Blockables Generator
Utility scripts for building Blockables puzzles.
Installation
Create a virtual environment and install the requirements like so:
$ python3 -m venv venv
$ source venv/bin/activate
$ pip3 install -r requirements.txt
You'll need to create a .env file like so:
ANTHROPIC_API_KEY=<API_KEY>
Generation
The primary script is generate-puzzle.py. To run, you must be
within the virtual environment. It's recommended to run unbuffered
like so:
$ python3 -u generate-puzzle.py -j 4
This runs indefinitely, repeatedly attempting to create 25 letter
phrases that can be arranged into a Blockables grid. On success, a
JSON dump is written to the generated directory.
Other Scripts
Included are the following auxiliary scripts:
download-puzzles.py- Queries each puzzle from
blockables.app. Update.envbefore running.
- Queries each puzzle from
analyze-puzzles.py- Scans downloaded files and prints basic stats about them.