One of the four daily puzzles in my browser game is TANDEM. It’s a 6×5 grid, and one arrow press moves two couriers at once. A courier that hits a wall or the edge stays put, and if both would land on the same cell or swap places, neither moves. You have to get both onto their goals.
Hand-placed goals tend to give levels that are either trivial or have a silly 3-move shortcut, so the generator works the other way round:
- Seeded RNG from the date, then place 7–9 walls and reject the layout if the open cells aren’t connected.
- Pick two start cells.
- BFS over the pair state (cell A, cell B). That’s only 30×30 = 900 states, so a full search from the start is basically free.
- From everything reachable, keep only pairs whose shortest path is 9–15 moves and where both couriers end up off their start cells. Pick one of those as the goals.
- Par is simply the BFS distance, so the “optimal” score is exact and not a guess.
Because the goals come out of the search, every puzzle is solvable by construction, and difficulty is controlled by one number (path length) instead of my intuition. The weak spot: path length isn’t the same thing as perceived difficulty. Some 10-move layouts feel harder than 14-move ones because the trick is moving “into” a wall on purpose so only one courier moves. One idea is to also count how many of the optimal moves are those one-courier-blocked moves.
If you’ve done generate-then-filter for puzzles, what did you end up measuring for difficulty?
The game is NOCTURNE ISLAND (four small daily puzzles, same set for everyone, free, no sign-up): https://nocturne-island.com/
Using the BFS distance as par is neat, since the “optimal” score can’t drift from the real puzzle. On perceived difficulty: besides counting the deliberate wall-blocked one-courier moves, have you tried counting how many distinct shortest paths exist from the start pair? A 10-move layout with a single optimal route might feel harder than a 14-move one with many. Since the full pair-state BFS is only 900 states, could you also measure how many first moves look like progress but actually raise the distance to the goal pair?
The different arrow sizes were funny to me :P

Cool project, charming UI/visual atmosphere




