Methods for exploring state spaces without using domain-specific knowledge about the problem. Aka. blind search.
These algorithms only know how to generate successor states and recognize goal states, but don’t have information about how close they are to a solution.
Branching Factor
Section titled “Branching Factor”The average number of successors generated from each node in a search tree or graph. Finite graph implies finite branching factor. Opposite is not necessarily true.
Algorithms
Section titled “Algorithms”Depth-First Search
Section titled “Depth-First Search”Complete iff search space is finite state space. Wanders off into infinite paths for infinite graphs. Not optimal, returns the first solution it finds.
Covered in detail in DFS on Graphs.
Depth-limited DFS
Section titled “Depth-limited DFS”Aka. DDFS. Depth-constrained DFS. Avoids wandering off into infinite paths.
Not complete. Causes a false-negative for nodes far apart. Not optimal. Returns the first solution it finds.
Iterative Deepening DFS
Section titled “Iterative Deepening DFS”Aka. IDS. Repeatedly runs DDFS with increasing depth limits. Stops when a solution is found. Complete iff finite. Wanders off into infinite for infinite graphs. Optimal iff all action costs are equal. Time complexity comparable to BFS. Space complexity is linear.
Works similar to BFS, but uses much less memory.
Breadth-First Search
Section titled “Breadth-First Search”Expands the shallowest nodes first. Covered in detail in BFS on Graphs.
Bidirectional Search
Section titled “Bidirectional Search”Expands 2 frontiers: around initial and goal states. BFS is used because it searches level by level. Stops when the frontiers meet.
Uniform Cost Search
Section titled “Uniform Cost Search”Aka. Dijkstra’s algorithm. Fails for graphs with negative weights. Expands the node with the lowest path cost. Optimal for general action costs. Named uniform because it expands nodes in increasing order of path cost.
Comparison
Section titled “Comparison”| Algorithm | Complete? | Optimal? | Time Complexity | Space Complexity |
|---|---|---|---|---|
| DFS | Yes* | No | or | or |
| DDFS | No | No | ||
| IDS | Yes* | Yes** | ||
| BFS | Yes* | Yes** | or | or |
| Bidirectional | Yes* | Yes** | ||
| UCS | Yes* | Yes | or | or |
* Iff the graph is finite.
** Iff all costs are equal.
Here:
- - branching factor
- - depth of the shallowest solution
- - maximum depth of the state space
- - depth limit
- - cost of the optimal solution
- - minimum action cost