Water Jugs

Runs entirely on your device — works with the network off, no ads, no account, no tracking.

  • Works offline
  • Keyboard playable
  • Screen-reader playable
  • No ads, no account
  • No betting, no money, no prizes
  • 2–4 minAll ages

How do you measure an exact amount with unmarked jugs?

You use the jugs against each other, because the only two amounts you can create directly are "full" and "empty". Pouring a full jug into a partly-filled one leaves behind the difference between what you had and the space you poured it into — and that difference is the measurement. So work backwards from the target instead of forwards from the tap. If you want 4 litres and you have a 5-litre jug, you need to take 1 litre out of it, so you first need somewhere with exactly 1 litre of free space: a 3-litre jug already holding 2. Now you have a smaller problem of the same shape, and it usually falls apart in two or three steps. Every route in this game is found the same way, and the shortest one is counted for you while you play so you can tell a good pour from a wasted one immediately.

Moves 0 / 15Shortest from here 9Step 1 L

Target 10 litres. Now jug 1 holds 0 of 11, jug 2 holds 0 of 13, jug 3 holds 0 of 15. 15 moves left, and the shortest route from here is 9. Cursor on jug 1. Nothing picked up.

Leave exactly 10 litres in one jug.

The shortest route from here is 9 moves and you have 15 left. The capacities 11, 13, 15 share no factor above 1, so every whole litre from 0 to 15 can be measured here.

With jugs of 11, 13, 15 litres the step is 1. Measurable: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 litres. Every whole number of litres up to the largest jug can be measured.

choose a jug · fills it from the tap · empties it down the drain · Enter picks a jug up, then Enter on another pours into it · Esc puts it back for free. Click the board first, or press Tab to focus it.

What this builds

DOMAINtell in advance whether an amount can be measured at all — the reachable amounts are exactly the multiples of the greatest common divisor of the jug capacities, up to the largest jug

Measure an exact amount with jugs that have no markings

Three jugs, a tap and a drain. The jugs hold a fixed whole number of litres each and there is not a single mark on the side, so the only things you can do are fill one to the brim, tip one away, and pour one into another until either the first is empty or the second is full. Leave exactly the target amount sitting in one jug and you are finished.

Every board is searched before it is dealt: the target is proven reachable, the shortest route is counted, and the moves you are given are that number plus six. The count of moves still needed is printed while you play, so you always know whether the pour you just made helped or cost you.

It runs entirely on your device: 0 network requests, works offline. No ads, no account, nothing to buy, and no betting, money or prizes of any kind.

How to play

  1. Focus the board — click it, or press Tab until it is focused.
  2. Choose a jug with the left and right arrows. Each jug prints what it is holding over what it can hold, so nothing depends on judging the water line by eye.
  3. Press the up arrow to fill the chosen jug from the tap, and the down arrow to empty it down the drain. Each of those is one move.
  4. Press Enter on a jug to pick it up — a appears on it — then Enter on another jug to pour the first into the second. It stops when the source runs out or the destination is full, which is the whole trick of the puzzle.
  5. Press Esc to put a picked-up jug back down. Changing your mind is always free, and so is any gesture that could not move water — pouring from an empty jug costs you nothing.
  6. Watch "shortest from here". It is the fewest moves that still finish the board from exactly where you are standing. If it goes up, the last move cost you; when it reaches zero you have won.
  7. Read the ruler. Under the jugs, every whole litre from zero to the largest jug is listed, and the ones this board can never produce are struck through. The is your target.

FAQ

How do you measure an exact amount with unmarked jugs?

You use the jugs against each other, because the only two amounts you can create directly are "full" and "empty". Pouring a full jug into a partly-filled one leaves behind the difference between what you had and the space you poured it into — and that difference is the measurement. So work backwards from the target instead of forwards from the tap. If you want 4 litres and you have a 5-litre jug, you need to take 1 litre out of it, so you first need somewhere with exactly 1 litre of free space: a 3-litre jug already holding 2. Now you have a smaller problem of the same shape, and it usually falls apart in two or three steps. Every route in this game is found the same way, and the shortest one is counted for you while you play so you can tell a good pour from a wasted one immediately.

Why are some amounts impossible no matter what I do?

Because every amount you can ever leave in a jug is a multiple of the greatest common divisor of the three capacities — the largest whole number that divides all of them. Filling gives you a capacity, emptying gives you zero, and pouring only ever adds and subtracts capacities from what is already there, so nothing that is not a multiple of that divisor can appear. With jugs of 4, 6 and 10 litres the divisor is 2, and no sequence of pours will ever leave an odd number of litres anywhere. With jugs of 3, 7 and 10 it is 1, so every whole litre up to 10 is measurable. That is what the struck-through numbers on the ruler are: not amounts that are merely hard, amounts that are arithmetically out of reach forever. Roughly half the boards here have some, on purpose.

Is the target always reachable?

Always, and it is proven rather than assumed. Before a board is dealt, a breadth-first search walks every position those three jugs can reach — at most a few thousand — and records the fewest moves that leave each amount in some jug. The target is drawn only from amounts the search actually reached, and the move budget is that amount's own depth plus six spare. The same search also checks the ruler in both directions: every multiple of the divisor must be reachable and every non-multiple must not be, or the board is thrown away and another is drawn.

What happens when the moves run out?

The round ends and the shortest route is explained. The round also ends early if the shortest route left is longer than the moves you have — that position is already decided, and pouring on would only postpone the same answer. Six spare moves is room for a wrong turn and the pour that repairs it, so losing usually means one irreversible move: emptying a jug that was holding the very amount you had just worked to produce.

Is there any money, betting or in-app purchase in this?

None, and there never will be. No currency, nothing to buy, no hints to unlock for a fee, no prizes.

Does it work offline?

Yes. Once the page has loaded once, the whole game — the board generator, the search that proves the target reachable and the one that counts your shortest remaining route — is on your device. No server is involved in play at any point.

Can I play it with a keyboard or a screen reader?

Both. Arrows choose a jug and fill or empty it, Enter picks up and pours, Esc puts a jug back. Every jug announces its contents and its capacity as numbers, the jug holding the target announces it, and the list of measurable and impossible amounts is read out in full rather than shown only as marks. A picked-up jug carries a , a jug holding the target carries a , and an impossible amount is struck through — so nothing on the board depends on telling two colours apart.

Limits

Three jugs, always, with capacities between 2 and 18 litres and all distinct. Everything is whole litres: there are no half-measures and no marks on the jugs, which is what makes the arithmetic exact. The target is never equal to a jug's capacity, because "fill that one" is not a puzzle, and it always sits between four and nine moves from the empty board — deep enough to need a plan, short enough to finish in a sitting. Boards whose capacities share a factor are drawn deliberately about half the time so that impossible amounts turn up often enough to be learned from.

Related

Balance Scale is the other measuring puzzle here — it turns on comparison where this one turns on division. Gap Logic and Grid Clues are the deduction puzzles that turn on order and overlap, and Light Grid turns on parity, which is the same divisor argument with a divisor of two.

Bookmark this page (Ctrl+D, or ⌘D on Mac) or install the app — it works offline the next time you need it.

Have a question or feedback about this game?

Private: this note isn't tracked, and nothing you did in this game is sent — only what you type here.