6

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:

  1. Seeded RNG from the date, then place 7–9 walls and reject the layout if the open cells aren't connected.
  2. Pick two start cells.
  3. 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.
  4. 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.
  5. 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/

you are viewing a single comment's thread
view the rest of the comments
[-] BorkyBold@programming.dev 1 points 13 hours ago* (last edited 13 hours ago)

Ha, fair. The side arrows are plain text glyphs, and that font draws them smaller than up and down. Noted, thanks for the screenshot.

this post was submitted on 07 Nov 2026
6 points (100.0% liked)

Game Development

6500 readers
20 users here now

Welcome to the game development community! This is a place to talk about and post anything related to the field of game development.

Community Wiki

founded 3 years ago
MODERATORS