Two classic state-space search problems. Play them, then let the AI solve them.
X = litres currently in the big jug. Y = litres currently in the small jug. The jugs have no markings, so these six operators are the only legal moves.
A state is the ordered pair (x, y). The start state is (0, 0) and the goal test is x = target ∨ y = target. "Par" is the true shortest path, computed live by breadth-first search — beat it and you can't, match it and you've found an optimal solution.
Path through the state space
Tap a figure on the boat's bank to load it aboard. Tap one in the boat to send it back.
Three missionaries and three cannibals must cross a river. There is one boat.
A state is the triple (m, c, b) — missionaries on the left, cannibals on the left, and which side the boat is on. Start is (3, 3, L), goal is (0, 0, R). The safety rule is what turns this into a constrained search: many states are reachable but illegal, and a good search algorithm prunes them. The shortest solution takes 11 crossings.
Path through the state space