The whole, before the parts

Symbolic AI turns a problem into a space of situations connected by moves, then lets a machine hunt through that space for a path to the goal. The one idea that carries the topic is the trade between knowledge and search: the less you know about a problem, the more of the space you must explore, and every technique below — heuristics, pruning, constraint propagation, planning — is a way of spending knowledge to avoid exploration. The standing enemy is combinatorial explosion, the brutal growth in paths as problems get bigger. Citation needed

For example, a route planner represents places and allowed moves, then looks for a sequence that reaches a destination. Information about distances can help it choose which possibilities to examine first. Citation needed

Start with the represented situations and basic search, then examine ways to guide search or rule out choices. Games, constraints, and planning extend the same question: what knowledge lets a system reach a goal with less exploration? Citation needed

Terminology and core concepts

  1. State spaces

    A state is a complete snapshot of the situation; the state space is every state reachable by legal actions from the start, and solving the problem means finding a path of actions from start state to a goal state. Citation needed

    What does a state capture?
    everything relevant about the situation now Citation needed
    What connects two states in the space?
    a legal action Citation needed
    What counts as a solution in state-space terms?
    a path from start to a goal state Citation needed
    What decides a formulation's state space size?
    what the state chooses to represent Citation needed
    In the 8-puzzle, what is a state?
    one arrangement of the tiles Citation needed
  2. Uninformed search

    With no knowledge beyond the space itself, the only choice is expansion order: breadth-first search expands shallowest states first and finds a shortest path; depth-first search dives down one branch and saves memory at the cost of guarantees. Citation needed

    Which states does breadth-first search expand first?
    the shallowest unexpanded ones Citation needed
    What does breadth-first search guarantee with unit-cost actions?
    a shortest solution Citation needed
    What is depth-first search's advantage?
    memory linear in depth Citation needed
    What is depth-first search's danger?
    diving forever down a fruitless branch Citation needed
    Why track already-visited states?
    to avoid re-exploring loops Citation needed
  3. Heuristics and A*

    A heuristic is an estimate of the remaining cost to the goal; A* expands states in order of path cost so far plus heuristic, and finds an optimal path whenever the heuristic is admissible — never overestimating the true remaining cost. Citation needed

    What does a heuristic estimate?
    remaining cost from a state to the goal Citation needed
    What quantity does A* expand lowest-first?
    cost so far plus heuristic estimate Citation needed
    What makes a heuristic admissible?
    it never overestimates true remaining cost Citation needed
    What does admissibility buy A*?
    an optimal solution Citation needed
    Of two admissible heuristics, which searches less?
    the one with larger values Citation needed
    Why is straight-line distance admissible for road routes?
    no road is shorter than the straight line Citation needed
  4. Adversarial search

    Against an opponent the path is not yours to choose; minimax assumes the opponent plays best and values a position by the outcome of perfect play, while alpha–beta pruning skips branches that provably cannot change the decision. Citation needed

    What does minimax assume about the opponent?
    it plays its best move Citation needed
    What is a position's minimax value?
    the outcome under perfect play by both Citation needed
    What does alpha–beta pruning cut?
    branches that cannot affect the choice Citation needed
    Does pruning change the move minimax picks?
    no, only the work to find it Citation needed
    Why do game programs cut off search and estimate?
    full game trees are too large Citation needed
  5. Constraint satisfaction

    A constraint satisfaction problem assigns values to variables under constraints; its power move is propagation — deducing from each constraint which values are impossible — so that deduction shrinks the space before search touches it. Citation needed

    What three things define a constraint satisfaction problem?
    variables, domains of values, constraints Citation needed
    What does propagation do to a variable's domain?
    removes values no constraint allows Citation needed
    What does an emptied domain signal?
    the current partial assignment is doomed Citation needed
    What is backtracking?
    undoing the last choice when stuck Citation needed
    Why fill the most constrained variable first?
    failures surface earliest there Citation needed
  6. Knowledge representation

    A knowledge base stores facts and rules in a formal language — typically a logic — so that inference can derive what is implied but never stated; the craft is choosing a representation expressive enough for the domain yet cheap enough to reason over. Citation needed

    What does a knowledge base contain?
    facts and rules in a formal language Citation needed
    What does inference add to a knowledge base?
    consequences that were implied, not stated Citation needed
    What is the standing trade in choosing a representation?
    expressiveness against cost of inference Citation needed
    Why prefer rules over enumerating cases?
    one rule covers unboundedly many cases Citation needed
    What breaks when the knowledge base holds a contradiction?
    inference can derive anything Citation needed
  7. Planning

    Planning represents actions by preconditions and effects — what must hold to act, and what the action changes — so a planner can chain actions into a sequence that transforms the initial state into one satisfying the goal. Citation needed

    What is an action's precondition?
    what must hold for it to apply Citation needed
    What is an action's effect?
    what it makes true or false Citation needed
    What is a plan?
    an action sequence from start to goal Citation needed
    How can a planner work backwards?
    from the goal to actions achieving it Citation needed
    Why is planning still search?
    action choices branch like moves Citation needed
  8. The limits of the symbolic program

    Combinatorial explosion makes exhaustive search hopeless at scale, and the frame problem — stating compactly what an action leaves unchanged — plus the sheer bulk of common-sense knowledge is what pushed much of the field toward learning rules from data instead. Citation needed

    How does the state space grow with problem size?
    exponentially Citation needed
    What is the frame problem?
    compactly stating what an action does not change Citation needed
    Why did hand-coding common sense stall?
    the needed knowledge proved vast and tacit Citation needed
    Where do symbolic methods still dominate?
    well-formalised domains with exact rules Citation needed

Problems that prove it

  1. Cities: S–A costs 2, S–B costs 5, A–G costs 6, B–G costs 1. Heuristic: h(S)=5, h(A)=5, h(B)=1, h(G)=0. Run A* from S to G.

    Drills: the cost-so-far-plus-estimate discipline, one expansion at a time.

    Derivation steps
    1. Expand S: A scores 2+5 = 7, B scores 5+1 = 6.
    2. Lowest is B at 6; expanding it reaches G with cost 6, score 6+0 = 6.
    3. Frontier now holds A at 7 and G at 6; expand G — goal reached.
    4. Solution: S → B → G with cost 6.
    5. Optimality check: the other route S → A → G costs 8, and h never overestimated. ✓

    Citation needed

  2. A maximiser chooses between two moves; the opponent then picks one of two outcomes. Left move leads to outcomes 3 and 12; right move to 8 and 2. Find the minimax choice, then show a pruning opportunity.

    Drills: valuing positions by the opponent's best reply.

    Derivation steps
    1. Left branch: opponent picks the minimum of {3, 12} = 3.
    2. Right branch: opponent picks the minimum of {8, 2} = 2.
    3. Maximiser compares 3 against 2 and moves left.
    4. Pruning: evaluate right branch's outcomes in order 2 first — the branch value is already ≤ 2 < 3.
    5. The outcome 8 need never be examined; the decision is unchanged.

    Citation needed

  3. Colour a map of three regions — each pair adjacent — with colours {red, green}; then with {red, green, blue}. Use propagation to settle both quickly.

    Drills: constraint propagation detecting failure before search does.

    Derivation steps
    1. Variables: regions X, Y, Z; constraint: adjacent regions differ.
    2. Two colours: assign X = red; propagation strips red from Y and Z, leaving both green.
    3. But Y and Z are adjacent and both forced green — a domain wipes out; no solution exists.
    4. Three colours: assign X = red, Y = green; propagation leaves Z only blue.
    5. Assignment (red, green, blue) satisfies every constraint. ✓

    Citation needed

  4. Formalise a one-step plan: action unlock has precondition have-key, effects door-open; start state has have-key, goal is door-open. Plan backwards from the goal.

    Drills: preconditions and effects as the plan-chaining mechanism.

    Derivation steps
    1. The goal door-open is false in the start state, so some action must achieve it.
    2. Search actions by effect: unlock makes door-open true.
    3. Its precondition have-key becomes the new subgoal.
    4. have-key already holds in the start state — the chain bottoms out.
    5. Plan: [unlock]. Executing it from the start state satisfies the goal. ✓

    Citation needed

Sources

  • Stuart Russell and Peter Norvig, Artificial Intelligence: A Modern Approach — the standard treatment of search, games, constraints, and planning.
  • Judea Pearl, Heuristics: Intelligent Search Strategies for Computer Problem Solving — the deep book on where heuristic power comes from.
  • Nils Nilsson, The Quest for Artificial Intelligence — the history of the symbolic program from a participant.

Learning path

Continue through Artificial Intelligence & Machine Learning in order, using the concepts above to connect this topic to the next.