Train Tracks

Train Tracks Puzzle Solver

Type in a puzzle from anywhere and get the finished track. Handy for checking your answer or getting unstuck.

Type each clue number, tap a square to cycle through the six pieces for any grey square the puzzle starts with, and tap an edge arrow to place the entrance (A) and exit (B).

Tap a tab on the edge of the grid to set the entrance, then the exit.

How to use it

  1. Choose the grid size of your puzzle.
  2. Type the number beside every row and every column. Enter 0 where the clue is 0.
  3. Tap an arrow on the edge to place the entrance (A), then another for the exit (B).
  4. Tap each grey square the puzzle starts with until it shows the same piece.
  5. Press Solve. The track appears in the grid.

How the solver works

It searches for the one path from the entrance to the exit that never revisits a square, passes through every grey square with the right piece and matches every row and column count. It drops a branch the moment a count is exceeded or a square can no longer be reached. That is the same logic you use by hand in the step-by-step guide, just much faster.

Frequently asked questions

How do I use the Train Tracks solver?

Pick the grid size, type the numbers shown beside each row and column, tap an edge arrow to set the entrance and then the exit, and tap any squares that start with a piece already on them until they show the right shape. Press Solve.

Does it work for puzzles from other sites and apps?

Yes, as long as the puzzle follows the standard rules: one track from the entrance to the exit, row and column counts, no branches or crossings. It handles grids from 4×4 to 9×9, so it also works for puzzles from books and apps such as Simon Tatham's Tracks.

What if it says there is more than one solution?

Well-made puzzles have a single answer, so a second solution usually means a clue or a starting piece was entered wrongly. The solver still shows one valid answer so you can see how it fits.

Why does it say no railway fits?

Usually one clue is mistyped, so the row and column totals no longer match, or the entrance and exit are on the wrong edge squares. Check those first.

Is my puzzle sent anywhere?

No. The solving happens in your browser, so nothing you enter is uploaded.

Will using the solver ruin the daily puzzle?

It's up to you. The Daily leaderboard ranks times earned without hints, so a solved Daily wouldn't be a fair time. For learning, try solving a practice board yourself first and use the solver to check your answer.

Rather solve it yourself?