Pipe Connection Puzzle
Rotate pipes to connect the corners, plus the measurement: a tee is exactly as flexible as a cross, and a bigger board is easier to connect.
Click a tile to turn it a quarter turn. Get water from the top-left corner to the bottom-right; everything currently joined to the source is drawn in blue. Every puzzle is built around a real route, so one always exists. Nothing is uploaded.
A tee is exactly as useful as a cross
A path through a tile arrives on one side and leaves by another, so what matters is which pairs of sides it can present at once. There are six such pairs. Counting them over every rotation separates the tiles in a way the pictures do not:
| Tile | Distinct rotations | Pairs it can serve | Straight through | Can turn |
|---|---|---|---|---|
| straight | 2 | 2 of 6 | yes | no |
| elbow | 4 | 4 of 6 | no | yes |
| tee | 4 | 6 of 6 | yes | yes |
| cross | 1 | 6 of 6 | yes | yes |
The cross looks like the most useful tile because it has the most openings. For a path it is worth exactly what a tee is worth — three openings already reach all six pairs, so the fourth buys nothing at all.
It is in fact the worse tile to have in a puzzle. A cross is rotationally symmetric, so it is the one tile whose rotations do nothing — turning it changes the board not at all, and a grid full of crosses has no moves in it.
The straight and the elbow are the interesting pair. A straight can never turn a corner and an elbow can never go straight through — and between them they cover all six pairs with nothing in common at all. They are exact complements.
And a bigger board is easier to connect, not harder
Take tile sets at random and ask whether they could be turned into some route from corner to corner. With tees available the answer is essentially always yes, which makes "is this set connectable" a useless question for a generator — it rejects almost nothing.
| Tiles used | 4 × 4 | 6 × 6 | 8 × 8 |
|---|---|---|---|
| all four | 99.8% | 100.0% | 100.0% |
| straight and elbow | 66.0% | 83.0% | 95.7% |
| no cross | 98.0% | 100.0% | 100.0% |
| tee and cross | 100.0% | 100.0% | 100.0% |
Only the restricted row bites — and read it left to right. Connectability rises with the size of the board, from 66.0% at 4 × 4 to 95.7% at 8 × 8. That runs against the intuition that more tiles means more that can go wrong. It happens because the route only has to exist somewhere: a bigger board adds candidate paths faster than it adds constraints along any one of them.
Which is why the puzzles above are not generated by sampling and testing. A route is laid first and the tiles are fitted to it, so one is guaranteed rather than hoped for. The table is frozen, so fresh sets it has never seen are measured at build time as a check: 70.4% at 4 × 4 against 97.6% at 8 × 8.
How to use
- Click a tile to turn it a quarter turn clockwise.
- Join the top-left corner to the bottom-right one.
- Everything currently joined to the source is drawn in blue.
- Every puzzle is built around a real route, so one always exists.
- Change the board size for a longer game.
Frequently asked questions
Which pipe tile is the most useful?
The tee, and it ties with the cross rather than losing to it. A path through a tile arrives on one side and leaves by another, so what matters is which pairs of sides it can present at once. There are six such pairs, and a tee reaches all six — exactly as many as a cross, despite having one fewer opening.
Is a cross not better than a tee?
It is slightly worse to have in a puzzle. It reaches no more pairs, and it is rotationally symmetric — the only tile whose rotations do nothing at all. Turning a cross changes the board not at all, so a grid full of them has no moves in it.
What can a straight pipe not do?
Turn a corner, ever. It serves only two of the six pairs, both of them opposite sides. An elbow is its exact complement: it serves the other four, can never go straight through, and between them the two cover every pair with nothing in common.
Are bigger boards harder to connect?
The opposite, which surprised us. Using only straights and elbows, the share of random tile sets that could be rotated into a route runs 66.0 per cent at 4 by 4, 83.0 per cent at 6 by 6 and 95.7 per cent at 8 by 8. The route only has to exist somewhere, and a bigger board adds candidate paths faster than it adds constraints along any one of them.
How are these puzzles generated?
A route is laid down first and the tiles are fitted to it, then everything is scrambled. The obvious alternative — scatter tiles at random and test whether a route exists — is a poor one, because with tees in the mix almost every random set is already connectable, so the test rejects nothing and guarantees nothing.
Can a puzzle be unsolvable?
No. Because the route is laid before the tiles, every puzzle here has at least one solution by construction rather than by luck. The scramble is also re-rolled if it happens to leave the board already connected, which it does about one time in five.
Does this send anything anywhere?
No. Every puzzle is built and checked in your browser, and nothing is uploaded.
🔒 This tool runs entirely in your browser. Nothing you enter is uploaded, logged, or stored.