Train Track Logic asks you to finish a railway across a grid map. A few rail pieces are already placed, along with the two ends of the line, A and B. Numbers along the top and right edges tell you how many squares in each column and row carry track, and you must lay one route that fits every count exactly. Train Track Logic is Tracks, written by James Harvey for Simon Tatham’s Portable Puzzle Collection.
Laying the line
The railway starts at A on the left edge and finishes at B on the bottom edge. In between, it can only use straight rails and 90-degree curves, and it may not cross, branch or loop.
Every printed piece belongs to the answer. Column clues count track squares in that column, and row clues do the same for rows.
To build, click the edge between two squares to lay rails across it. Right-click an edge to cross it out. Clicking inside a square adds a marker that means track goes through here, and right-clicking means no track. A clue turns red when its line holds too much track, and the map flashes when the route is complete.
Twelve presets run from 8x8 to 15x15 at Easy, Tricky or Hard.
Train Track Logic Controls
| Action | Keyboard | Mouse | Touch |
|---|---|---|---|
| Lay a track piece across an edge | Arrow keys to move onto an edge, then Enter | Left-click the edge between two squares | Tap the edge with Tap set to Track |
| Mark an edge as "no track here" | Space on an edge | Right-click the edge | Press and hold the edge, or set Tap to Cross and tap |
| Mark a square as "has track" / "no track" | Enter / Space on a square | Left-click / right-click inside the square | Tap / press and hold inside the square |
| Mark a whole line of squares | — | Left- or right-drag across several squares | Drag (press and hold first for crosses) |
| New game, undo, redo | N, U, R | Menu buttons above the grid | Menu buttons above the grid |
Counting and connecting
This puzzle is half arithmetic and half path logic. The clues are sums: if a row of eight needs eight track squares, every square is track. If it needs zero, none are. In between, you compare what is placed, what is ruled out and what is still open.
The path rules add structure. Every track square uses exactly two of its four sides, which is the same rule that powers loop puzzles. Put those two ideas together and you get long, satisfying chains of reasoning.
Strategy for engineers
- Fill full and empty lines first. A clue of 0, or one equal to the line’s length, settles that line.
- Use the two-sides rule. If a track square has two edges crossed out, its other two edges must carry rails.
- Extend every given piece. Each one points into a neighbor that must also have track.
- Close out finished lines. When a row’s count is met, drag crosses along the rest of it.
- Avoid loops. A route that circles back on itself can never connect A to B.
- Plan your turns. To reach a far column, the track has to bend toward it somewhere.
Small Details That Help
Undo, redo and Solve are always available, and drag-marking works on touch screens. Small Easy maps take about five minutes. For more route building, try Number Path, or connect pipes in Net Pipe Puzzle.
Tested and updated:













