Play a free pipe-turning puzzle: rotate tiles until every pipe is joined to the source with no open ends. Five sizes, a hint, and an exact fewest-turns number.
Turns 0
Joined 0
Open ends 0
Fewest possible -
Your best -
Tap a tile to turn it a quarter turn clockwise. Join every pipe so that no end is left open, and everything is connected to the source. Arrow keys move between tiles, Enter or Space turns the tile, H gives a hint. A best score only counts if you did not use the hint. A cross looks the same in every direction, so it never needs turning.
A board starts as a random spanning tree: a set of pipes that joins every cell to every other cell with no loops. Each tile keeps the shape that tree gives it (end cap, straight, elbow, tee or cross) and then gets a random turn, so a finished layout always exists.
The fewest possible turns comes from an exact search. It tries each way of turning each tile, row by row, drops any layout whose openings do not match their neighbours or that would close a loop, and keeps the cheapest. The hint uses the same search from where you are now and points at a tile the cheapest layout still needs to turn, nearest the source first.
As-is, no warranty. These apps are free under their listed license and run entirely in your browser. Use at your own risk — don't blame me if your PC catches fire, your dog runs away, or the math turns out wrong. Verify anything that actually matters. None of this is professional financial, medical, legal, or engineering advice.
The board is a grid of pipe tiles. You cannot move a tile, you can only turn it. Tap or click a tile to turn it a quarter turn clockwise. The goal is a board where every pipe is joined to its neighbours, no pipe end is left open, and everything is connected to the source tile, which is the one with a big ring in the middle.
There are five shapes. An end cap has one opening. A straight pipe has two openings opposite each other, so it only has two different looks. An elbow has two openings at a right angle. A tee has three openings. A cross has four and looks the same however it faces, so it never needs turning.
Pick a size from 4 x 4 to 8 x 8. New puzzle deals a fresh board, Restart puts the tiles back as they started, and Hint points at a tile and says how many turns it needs. The page address holds the size and the board seed, so you can send someone the exact puzzle. There is no timer and no running flow, so you can take as long as you like.
What you see. A pipe that is joined to the source is bright, blue near the source and shading to teal further along. A pipe that is not joined yet is grey. A pipe end that touches nothing is striped. Above the board you will see how many tiles are joined and how many open ends are left. These cues use shape and pattern as well as colour. Screen readers get a description of every tile (“Row 2, column 3: elbow open up and right, joined to the source”) and a sentence after each turn.
Keyboard. Arrow keys, Home and End move between tiles. Enter or Space turns the tile you are on. H gives a hint. The keys only work while the focus is on the board.
Your best is the fewest turns you used on a board of that size. It only counts if you did not use the hint on that puzzle, and that stays true after a restart.
Boards are grown, then scrambled. The generator grows a random spanning tree over the grid: a set of pipes that joins every cell to every other cell with no loops. It grows from a random cell, and at each step it either extends the newest pipe (long winding runs) or a random one (branches), so you get a mix of shapes. Each tile keeps the shape the tree gives it and then gets a random turn. Turning the tiles back to the tree always finishes the board, so no puzzle is impossible.
A finished board is a tree. A board where every opening is matched and everything is connected has the same number of pipes as the tree it came from, which is one fewer than the number of tiles. So a finished layout can never contain a loop.
The search is exact. To find the fewest turns, the search fills the grid row by row, trying each distinct look of each tile (four for most shapes, two for a straight pipe, one for a cross). It rejects a choice if an opening does not match its neighbour on the left or above, if an opening faces the edge, or if it would join two tiles that are already connected, which would close a loop. At the end it keeps the layout that needs the fewest clockwise turns from where the tiles are now. The same search from your current position gives the hint: it picks a tile that the cheapest layout still needs to turn, nearest the source first.
Everything runs locally in your browser. There is no account, nothing is uploaded, and your best scores stay on your device.
For informational purposes only. Not financial, medical, or legal advice. You are solely responsible for how you use these tools.