Russell and Norvig, Chapter 4: Informed Search Methods 4.1 Best-First Search - evaluation function = desirability of expanding a node - best-first search always selects a node for expansion having the highest evaluation function - greedy search - minimize estimated cost to reach goal - estimate provided by heuristic function - e.g., straight-line distance in route finding - A* search - minimize total path cost (path so far + estimate to goal) - f(n) = g(n) + h(n) - if estimate to goal never overestimates, heuristic is admissible and search is optimal and complete - e.g., straight-line distance - no other optimal algorithm is guaranteed to expand fewer nodes than A* - still exponential - still keeps all nodes in memory (see Sec 4.3) 4.2 Heuristic Functions - h2 is better than h1 if h2 >= h1 always (h2 dominates h1) - invent heuristics by relaxing problem constraints - heuristic evaluation should be efficient - constraint-satisfaction problems - selecting a variable - most-constrained variable (fewest possible values) - most-constraining variable (involved in most constraints) - selecting a value - least-constraining value (rules out fewest values of other variables) 4.3 Memory-Bounded Search - Iterative Deepening A* (IDA*) [Fig4.10] - depth-first search through all nodes whose f <= flimit - new flimit is the minimum f of nodes expanded beyond flimit - number of IDA* iterations proportional to number of different f values - could used fixed flimit increment, but not admissible (e-admissible) - Simplified Memory-bounded A* (SMA*) [Fig4.12] - removes high-f-value nodes from queue as memory constraints dictate - f values of removed nodes retained in ancestors - removed nodes regenerated only if all other paths are worse - optimal and complete if shallowest, optimal solution fits in memory - otherwise, returns best solution reachable - example [Fig4.11] 4.4 Iterative Improvement Algorithms - start with complete configuration and modify until solution - e.g., 8 queens - hill-climbing search (gradient descent) [Fig4.14] - move to best successor, discarding path information - local maxima, plateaus (random walk) - ridges (steep sides and gentle slope to peak) - oscillate side-to-side with little progress - random-restart hill climbing - simulated annealing [Fig4.15] - hill-climbing with some probability of making poor moves - move selected randomly - probability related to quality of move - improving move always taken - poor moves more likely at high temperatures, but search "freezes" as temperature decreases (P = e^(dE/T)) - dE = value(nextstate) - value(currentstate) - T = temperature - slow enough temperature-decrease-schedule yields optimal solution - constraint satisfaction problems - choose a value for each variable, then use heuristic repair - e.g., choose values with minimum conflicts with other variables