Skip to content
One Quick Try

River Crossing Puzzle

Get the wolf, the goat and the cabbage across the river without anything getting eaten.

Type
Logic
Takes
about 2-5 min
Result in
crossings

River Crossing

~2-5 min

  1. A farmer has to get a wolf, a goat and a cabbage across a river.
  2. The boat carries the farmer and one passenger at most.
  3. Left alone together, the wolf eats the goat and the goat eats the cabbage. Get all three across safely.

Tap a passenger to put it in the boat, then press Cross.

Your result: —

How it's measured
  • Water Jug

    Measure an exact amount with unmarked jugs.~1-4 min
  • Tower of Hanoi

    Move every disk in the fewest moves.~1-5 min
  • Make 24

    Use all four numbers to make 24.~2-4 min
  • Lights Out

    Turn off every light. Each press flips its neighbors.~1-3 min
  • One Line

    Draw every line once, without lifting.~2-4 min
  • Traffic Jam

    Slide the cars to free the red one.~2-6 min

The puzzle

A farmer has to get a wolf, a goat and a cabbage across a river. The boat is small: it carries the farmer and at most one passenger, and only the farmer can row. If the farmer leaves the wolf alone with the goat, the wolf eats the goat. If the farmer leaves the goat alone with the cabbage, the goat eats the cabbage. The wolf has no interest in the cabbage.

It is one of the oldest puzzles we know of: a version appears in a collection of problems attributed to Alcuin of York, written around the year 800.

How to play it here

The farmer is always in the boat. Tap a passenger on the bank where the boat is to put it in the boat, or tap it in the boat to take it out again. Then press Cross. When the boat arrives, the passenger steps off by itself. If a crossing leaves a hungry pair alone on the other bank, the try ends and you see who was eaten. Start over resets the puzzle at any time.

How we calculate your result

When everyone is safely across, you see your time and the number of crossings. The clock runs from the moment you press Start puzzle until the crossing that finishes it, so thinking time before your first move counts. Every trip of the boat is one crossing, including trips the farmer makes alone.

The fewest crossings that can solve the puzzle is 7. We didn't take that from a book: the site works it out by trying every safe sequence of crossings, shortest first, and that search finds exactly 2 solutions of 7 crossings and none shorter.

What does my rating mean?

The rating compares your crossings with the fewest possible, 7, so it needs no averages. Every extra trip lowers it:

Rating (crossings)Crossings
Perfect7
Excellent8
Good9
Fair10–12
Keep trying13+

Other versions: fox, chicken and corn

The same puzzle is told with different characters: a fox, a chicken and a bag of corn, or a fox, a goose and a bag of beans. The rules and the solution are the same. Whatever stands in for the goat can't be left with either of the others, so it is the one that crosses first and makes one trip back.

A hint

Nothing says the boat has to come back empty. If you're stuck after the first crossing or two, think about what you could bring back.

The solution

Both shortest solutions, in case you want to check yours. Spoilers, obviously.

Solution 1
  1. Take the goat across.
  2. Go back alone.
  3. Take the wolf across.
  4. Take the goat back.
  5. Take the cabbage across.
  6. Go back alone.
  7. Take the goat across.
Solution 2
  1. Take the goat across.
  2. Go back alone.
  3. Take the cabbage across.
  4. Take the goat back.
  5. Take the wolf across.
  6. Go back alone.
  7. Take the goat across.

The two solutions are mirror images of each other: they differ only in whether the wolf or the cabbage crosses second. The goat has to go first, and it has to come back once.

Enjoyed planning moves ahead? The Tower of Hanoi is a longer puzzle of the same kind, and Make 24 is a quick one with numbers.

Questions

Can the farmer cross alone?
Yes. Press Cross with an empty seat. It counts as a crossing like any other.
Will the wolf eat the cabbage?
No. Only two pairs are a problem: the wolf with the goat, and the goat with the cabbage.
Is anyone in danger on the bank the farmer is on?
No. The farmer keeps the peace on whichever bank the boat is at. The danger is only on the other bank.
Is 7 crossings really the minimum?
Yes. Every possible safe sequence is checked, shortest first, and nothing shorter than 7 gets everyone across.