05 · Flutter app · 2024
Leap Logic
A solver for the 15-peg triangle, played back one jump at a time.



- Role
- Design and development
- Stack
- Flutter, Dart
- Method
- Depth-first search with backtracking
Jump until one is left
Fifteen holes, fourteen pegs. Jump a peg over its neighbour into an empty hole, remove the one you jumped, and finish with a single peg.
You choose which hole starts empty. Leap Logic searches for a sequence of jumps that ends with one peg, then plays it back step by step, with undo and reset along the way.
Try it here
This board runs the same kind of search in your browser. Pick the hole that starts empty, then play the solution or step through it.
Under the hood
Search
A recursive search tries every legal jump and backs out of dead ends until one peg remains.
Playback
The solution becomes a sequence of board states, one per jump, that the app steps through.
Board
A 15-hole triangle drawn point-down, with previous, reset and next controls.