Search & Planning

Adversarial search and constraint satisfaction. Graph search (BFS, DFS, Dijkstra, A*) lives under Engineering › Algorithms › Graph.

Adversarial Search: Minimax, Alpha-Beta and MCTS

Adversarial search for two-player games: minimax, alpha-beta pruning, evaluation functions, and Monte Carlo Tree Search (UCT) with a runnable Python example.

Constraint Satisfaction Problems (CSP)

Constraint satisfaction: variables, domains and constraints; backtracking with MRV, forward checking, AC-3 arc consistency, and a runnable Python solver.

Overview

Search is the oldest idea in artificial intelligence: describe a problem as states, actions that move between states, and a test for success, then explore systematically until a solution appears. Planning is search where the states describe the world and the actions have preconditions and effects. Modern machine learning has not replaced these methods; game engines, schedulers, configuration tools, route planners and even large-language-model agents still rely on them, often with learned heuristics guiding a classical search.

How the Topics Relate

Classical Search Problem Types State-space searchone agent, goal Adversarial searchopponent moves Constraint satisfactionassign variables BFS, DFS, A*path to goal Minimax, MCTSbest move Backtracking, AC-3consistent assignment All three explore a space of states; they differ in what a solution is and what knowledge prunes the search.

State-space search looks for a sequence of actions from a start state to a goal; uninformed methods such as breadth-first search guarantee the shortest path in steps, while A* uses an admissible heuristic to find optimal paths much faster. Those graph algorithms are covered under Engineering, Algorithms, Graph. Adversarial search handles two-player games, where the opponent chooses half the moves: minimax assumes optimal play, alpha-beta pruning skips branches that cannot change the decision, and Monte Carlo Tree Search replaces a hand-written evaluation with random playouts. Constraint satisfaction drops the idea of a path entirely: the goal is an assignment of values to variables that satisfies every constraint, and the power comes from propagating constraints to shrink domains before and during backtracking.

Choosing an Approach

Problem looks likeUsePage
Board or card game against an opponentMinimax with alpha-beta, or MCTS for large branching factorsAdversarial Search
Scheduling, timetabling, Sudoku, configurationBacktracking with MRV, forward checking, AC-3Constraint Satisfaction
Shortest route, puzzle solving, path findingBFS, Dijkstra, A*Graph algorithms

A useful test is to ask what the answer is. If it is a single move to play now, use adversarial search. If it is a set of values that must fit together, frame it as a CSP and let a solver handle it. If it is a route or sequence of steps, use graph search. Large real problems often mix them, for example a planner that uses constraint propagation to prune a state-space search.