Water Jugs

Make exactly the target amount of water (L means liters) in one of two jugs that have no markings. You can only fill a jug, empty it, or pour it into the other one.

Goal: 4 L in either jug

Left · 3 L
Right · 5 L

Measure by moving water.0 moves / minimum 6

Explore the state graph

Each line is a legal move. The largest dot is your current state; medium dots and solid lines mark your trail.

03 L →↑ 5 L0 L / 0 L3 L / 0 L0 L / 5 L3 L / 5 L0 L / 3 L3 L / 2 L3 L / 3 L0 L / 2 L1 L / 5 L2 L / 0 L1 L / 0 L2 L / 5 L0 L / 1 L3 L / 4 L3 L / 1 L0 L / 4 L

Current state: 0 L / 0 L

The horizontal axis is the left jug; the vertical axis is the right. Dots show amounts reachable from empty jugs; arrows show move direction.

How to play

Use the buttons to fill a jug, empty it, or pour it into the other jug. The goal is to get exactly the target amount in either jug. A pour keeps going until the jug you pour from is empty or the other one is full. You cannot stop halfway. You have as much water as you want. Stuck? Press Hint.

Learn more

Read more about it: The story of the water jug puzzle →