Exhibit 04Search & Planning

Missionaries & Cannibals

Three missionaries and three cannibals must cross a river in a boat that holds two. On a bank where any missionaries are present, cannibals may never outnumber them. Can one good move at a time add up to a plan? And how much of the answer depends on what we tell Jev?

Partly in scopePlanning from the current state alone is out of scope; memory and engine modes follow the recommended code + Jev pattern. TypeSafe homepage FAQ: “Some tasks requiring extended reasoning, such as complex mathematics or chess-like planning, may be better suited to large reasoning models.
World
State
Decision
Action
New state
Speed
Context given to Jev

Bank counts, boat side, the legal moves and the state each one leads to. What the exhibit sends by default. No memory.

RIVER
Left bank3 M3 Csafe
Right bank · goal0 M0 Csafe
step 0 / 30
State history
click a step to inspect it · ↺ repeated state
What Jev was told next
question + one description per legal move

Three missionaries and three cannibals must all cross a river from the left bank to the right bank. The boat carries one or two people and cannot cross empty. On either bank, if any missionaries are present, cannibals must never outnumber them. Here is the current state and the legal moves available right now. Which move should be made next?

  • 1 cannibalTake 1 cannibal from the left bank to the right bank. Afterwards: left bank 3 missionaries and 2 cannibals; right bank 0 missionaries and 1 cannibals; boat on the right bank.
  • 2 cannibalsTake 2 cannibals from the left bank to the right bank. Afterwards: left bank 3 missionaries and 1 cannibals; right bank 0 missionaries and 2 cannibals; boat on the right bank.
  • 1 missionary + 1 cannibalTake 1 missionary + 1 cannibal from the left bank to the right bank. Afterwards: left bank 2 missionaries and 2 cannibals; right bank 1 missionaries and 1 cannibals; boat on the right bank.
Jev
Step 0 / 30
Probability
Repeated stateNO
Goal reachedNO
Moves still needed (BFS)11
Distinct states seen1 / 16
Revisits0

Jev decision

idle
Ask Jev for one move, or Let Jev try to run up to 30 steps with the context level chosen above.
1 cannibal
2 cannibals
1 missionary + 1 cannibal
The whole state space
16 reachable states · every legal crossing drawn as a line
MISSIONARIES ON LEFT BANK →3M2M1M0MCANNIBALS ON LEFT →3C2C1C0CUNSAFEUNSAFEUNSAFEUNSAFEUNSAFEUNSAFESTARTGOALboat leftboat rightjev's walkplan foundrevisited
Jev decides
chooses locally

One call per move. What it knows depends on the context level: from bank counts alone up to memory, lookahead and even distances to the goal.

Jev + search
evaluates, code searches

The chess-engine split. Search guarantees an answer; Jev's scores decide which states to look at first. Here a simple rule orders them as well.

BFS
searches globally

Expands every state level by level until it reaches the goal, then reads back the shortest path. Guaranteed optimal: 11 crossings.

Lesson · Planning
Local choice + memory → plan
With only the current state, Jev locks into a two-state loop: every move is legal and locally plausible, and the run goes nowhere, no better than a random mover. Give it a record of visited states and it solves the puzzle, but most of that lift comes from the memory itself: a random mover that avoids visited states solves it almost every time too. With the lookahead features every run is optimal, and so is a no-model rule that uses the same features: at that level the features, not Jev, do the planning. Used the way chess engines use an evaluator, with code doing the search and Jev scoring states, it finds the optimal plan, but a one-line “people across” heuristic expands just as few states. Jev is not a planner on its own; inside a search, on a problem this small, it is not yet shown to be a better judge than a simple rule. Recorded numbers are on the Benchmark page.