core Estimated learning time: 4 h

4.5 Problem-solving agents and problem formulation

You can turn an informally described task into a formal search problem with a state space, successor function, goal test and path cost.

Before:01. Mathematics for Machine Learning02. Python — Basics to Advanced

Search algorithms are the easy half; formulating the problem is where the real work lives. Goal formulation comes first — a state representation cannot be chosen before knowing what counts as done — then the four components: initial state, successor function, goal test, path cost. It sits before every search algorithm because they all consume this formulation. The deep skill is abstraction: throwing away detail that cannot change the answer, and being able to justify each omission.

Work through these

  • Do goal formulation before problem formulation, and say why that order matters

    Deciding what counts as success comes before deciding how the problem is described, and doing it the other way round quietly builds the wrong problem. The order takes a moment to get right and a long time to recover from.

  • Specify the four components: initial state, successor function, goal test, path cost

    A search problem is fully specified by where you start, what actions lead where, how you recognise success, and what each step costs. Everything in the search unit assumes this specification exists.

  • Define state space, path, solution and optimal solution

    The set of all reachable situations, a sequence of actions through it, one that reaches the goal, and the cheapest such one. These four words are used constantly and are worth pinning down.

  • Justify an abstraction — what you are allowed to throw away

    An abstraction leaves out detail, and it is valid when every abstract solution can be turned back into a real one. That criterion is what separates a useful simplification from a broken one.

Sign in to keep your progress.

Free resources

Links last checked 29 Aug 2026.

Stuck here?

Ask a mentor. A real person answers, and they can see exactly which topic you're on. Usually within a couple of working days.

Checking your session…

Topics shown in module order.