The classic river crossing puzzle has exactly two shortest solutions of seven crossings each, both starting with the goat, and a browser game called River Crossing Puzzle now makes that fixed route playable with touch and keyboard controls. The puzzle itself is centuries old and has been a standard classroom introduction to state-transition graphs in computer science, so a player who finishes one crossing has already walked one edge of a fully described graph. The rules are short, the state space is small, and every move either counts or is rejected with a specific reason. That combination is exactly why the puzzle feels easy once the unsafe pairs are recognized: there are only four entities, only two unsupervised dangers, and only four possible passengers per crossing. The browser game turns those textbook rules into a single screen with two banks, a labeled boat, a fixed 1,000-point reward, and explicit safety feedback, so the focus stays on the next decision rather than on remembering the rules.

easy river crossing puzzle puzzles
Easy River Crossing Puzzle Puzzles: A 7-Crossing Route

The Classic River Crossing Puzzle in Your Browser

The setup is the same one used by the Julia Robinson Mathematics Festival river crossings page and by Margaret Fleck's University of Illinois state-diagrams text. A farmer stands on the near bank with a wolf, a goat, and a cabbage, and must move all four to the far bank. The boat holds the farmer plus at most one of the other three, and the same bank without the farmer cannot contain a wolf with a goat, or a goat with a cabbage. Wolf and cabbage are free to share an unsupervised bank because neither threatens the other.

The browser version at River Crossing Puzzle keeps every one of those constraints. It also adds product behavior that is not part of the historic riddle: a three-column river layout with shrink-safe bank panels that fits a 390-pixel phone viewport, four labeled passenger buttons, a crossing button, a mistakes counter, a live score, a Restart control, and a Boss Key. The screen shows both banks at once so the player can always see what would be left behind.

How the Wolf, Goat, and Cabbage Problem Works

Every bank that does not contain the farmer is checked for safety on every legal move. If that unsupervised bank contains both the wolf and the goat, or both the goat and the cabbage, the move is rejected. If the unsupervised bank contains the wolf and the cabbage, the move is allowed. Because the same check runs after every crossing, the player does not need to memorize the rule; the game announces the problem in plain text whenever a crossing would strand an unsafe pair.

Pair left together without the farmerStatusWhy
Wolf and goatIllegalWolf eats the goat
Goat and cabbageIllegalGoat eats the cabbage
Wolf and cabbageLegalNeither threatens the other

Boat capacity is just as simple. The farmer always pilots, because no animal or vegetable can drive. The farmer can take one passenger, or cross alone. That gives four passenger options on every crossing: nobody, wolf, goat, or cabbage. The passenger must begin the trip on the same bank as the farmer, so a selected passenger who is already on the far bank produces an explicit "passenger is on the wrong bank" message and nothing moves.

How to Play River Crossing Puzzle Step by Step

The whole route fits on a single screen. Use these steps in order.

  1. Open the River Crossing Puzzle page in any modern browser. The farmer, wolf, goat, and cabbage appear on the near bank with the boat beside the farmer.
  2. Read the four passenger buttons. They read "Farmer alone", "Take wolf", "Take goat", and "Take cabbage". The default selection is the goat, because every shortest solution begins with the goat.
  3. Pick the passenger whose current bank matches the farmer's. If the passenger is on the opposite bank, the game will tell you, and you should choose another option.
  4. Activate the crossing. On touchscreens, tap the crossing button. On a keyboard, press Enter or Space, or press the number key that matches the passenger: 1 for Farmer alone, 2 for wolf, 3 for goat, 4 for cabbage.
  5. Watch both banks. If the new arrangement leaves wolf with goat or goat with cabbage without the farmer, the game names the safety problem and nothing changes. Pick a different passenger and try again.
  6. Count your mistakes. The first illegal attempt does not end the run, so you can choose a different passenger and continue. The second illegal attempt deadlocks the run and the only legal action is Restart.
  7. Move all four entities to the far bank in safe crossings to earn exactly 1,000 points. The shortest path uses seven crossings, and the puzzle accepts any safe route that reaches the goal.
  8. Press Restart at any time to put the farmer, wolf, goat, and cabbage back on the near bank, reset the boat, reset the passenger selection to goat, and clear the crossing count, mistakes, and score.

Keyboard and Touch Controls for Every Move

Touch play uses native buttons with a touch-friendly minimum height, so every choice and the main crossing action is reachable with a thumb on a phone. Long labels do not push the page wider than the viewport because the two bank columns are shrink-safe.

Keyboard play covers the full route. Left Arrow and Up Arrow move the passenger selection to the previous option, Right Arrow and Down Arrow move it to the next. Enter and Space activate the crossing with the currently selected passenger. Number keys 1, 2, 3, and 4 immediately cross with Farmer alone, wolf, goat, or cabbage respectively. Visible focus behavior and labeled tokens support assistive-technology navigation, and each token exposes its current bank in the page's accessible state.

Two gestures handle unexpected interruptions. The shared double-Escape boss key switches to a neutral spreadsheet view and a second double-Escape returns to the same puzzle state, so a player can hide the screen quickly without losing progress. An illegal move never silently teleports a token: positions, the boat indicator, and the crossing counter all stay where they were, and a clear text message explains why the move was rejected.

The Shortest Route: Seven Crossings to 1,000 Points

The game represents every river arrangement as four bits in farmer-wolf-goat-cabbage order, where 0 means near bank and 1 means far bank. The initial state is 0000 and the goal is 1111. Out of the 16 possible bit arrangements, the safety validator accepts exactly 10, which matches the published state graph discussed by the Julia Robinson Mathematics Festival and Margaret Fleck's computer science text. The legal edges of that graph are generated by flipping the farmer's side and, when present, the passenger's side, then checking the result against the same safety validator.

Breadth-first search starts at 0000 and explores legal edges one crossing at a time. The first depth at which 1111 appears is seven. Retaining every equal-depth alternative produces exactly two shortest routes, and both begin with the goat. Carrying the wolf first would abandon the goat with the cabbage, carrying the cabbage first would abandon the wolf with the goat, and crossing alone would abandon both dangerous pairs. The two routes differ only on which outward trip carries the wolf and which carries the cabbage; the goat is ferried out last in both.

The product release tests do not trust the production breadth-first search as its own proof. An independent oracle encodes the four positions as numeric bits, implements safety directly from pair equality, generates moves with numeric passenger indexes, and performs a separate queue search. That oracle independently finds 10 safe arrangements, a minimum depth of seven, and two shortest routes. Tests then verify every state along a disclosed golden sequence, confirm the goal reaches 1111 at exactly 1,000 points, and exercise the two-error deadlock and the terminal-state freeze.

Why Beginners Find This Version Easy to Approach

Three design choices keep the first crossing approachable. First, the rule set is fully deterministic, so the same puzzle appears on every reload and a player can learn the exact state graph without surprise variations. Second, every illegal move is named in plain text rather than silently corrected, so a beginner knows whether the passenger was on the wrong bank or whether the proposed move would have left the goat unsupervised. Third, the two-error stop turns repeated misclicks into an explicit signal to Restart, which lets a new player reset cheaply and try a different passenger.

The fixed 1,000-point reward is product behavior, not a measurement. As the River Crossing Puzzle score guide explains, the score does not claim a longer safe route is impossible, does not rate intelligence or ability, and does not compare against any external population. It is a recreational entertainment score attached to a familiar fixed riddle, and the same route scores 1,000 on every run.

Everything runs locally in the browser. No move history or score is uploaded, no account is needed, no random puzzle is fetched, and no new runtime dependency is added. The first decision to make is small and obvious in hindsight: which passenger can be left apart from both threats. After that, treat each return trip as a graph edge; sometimes the only safe way to prepare the next outward cargo is to take an apparently backward step. That mental model turns the seven-crossing shortest solution into a natural read of the graph instead of a memorized script.

Related reading: Rotating Puzzle Game: Quarter-Turn Mechanics Explained.