A Scala puzzle framework with generators and solvers for classic puzzles — Sudoku, Hi-Q (peg solitaire), sliding tiles, Rubik’s Cube, Tantrix, mazes, and more. Each app shares a common search/UI framework so you can watch solvers find solutions or play by hand.
| Puzzle | Gradle task | Description |
|---|---|---|
| Hi-Q | runHiq |
Peg solitaire: jump until one peg remains in the center. |
| Sliding Puzzle | runSlidingpuzzle |
Slide numbered tiles into order. |
| Rubix Cube | runRubixcube |
Rotate cube layers until each face is a solid color (3D via jMonkeyEngine). |
| Sudoku | runSudoku |
Generate and solve Sudoku boards. |
| Tantrix | runTantrix |
Place hexagonal tiles so colored paths connect (3–30 pieces). |
| Amazing Maze | runMaze |
Generate mazes with tunable parameters. |
| One Tough Puzzle | runRedpuzzle |
Nine-piece all-nub jigsaw; brute-force and genetic solvers. |
| Bridge Crossing | runBridge |
Bridge-and-torch brain teaser: minimize crossing time. |
| Two Pails | runTwopails |
Measure a target volume by pouring between two containers. |
Option 1 — installer (recommended): download the installer for your OS from the
latest release
(macOS .dmg, Windows .msi, Linux .deb — one installer per puzzle).
Option 2 — from source:
git clone https://github.com/bb4/bb4-puzzles.git
cd bb4-puzzles
./gradlew runSudoku # or runHiq, runMaze, runTantrix, …
./gradlew tasks --group application # list all runnable puzzlesThe default ./gradlew run launches the maze generator. Gradle creates a run<Puzzle> task for each entry in appMap.
Published artifacts (latest release 2.1):
implementation 'com.barrybecker4:bb4-puzzle:2.1' // shared framework
implementation 'com.barrybecker4:bb4-sudoku:2.1'
implementation 'com.barrybecker4:bb4-hiq:2.1'
// also: bb4-slidingpuzzle, bb4-rubixcube, bb4-tantrix, bb4-maze,
// bb4-redpuzzle, bb4-bridge, bb4-twopailsSee the releases page if you need a different version.
com.barrybecker4.puzzle.common— shared framework: puzzle controllers, Swing viewers/renderers, and solvers (sequential, concurrent, A*, IDA*)- Per-puzzle packages under
com.barrybecker4.puzzle.*— model, UI, and solver code for each app in the table above com.barrybecker4.puzzle.rubixcube— 3D cube UI built on jMonkeyEngine / LWJGL
See the Building bb4 Projects wiki.
MIT — see LICENSE.



