if number of nodes expanded by A* is N and solution depth is d
then b* is the branching factor that a uniform tree of depth d would have to have in order to contain N nodes
thus, N = 1 + b* + (b*)² + … (b*)ᵈ
e.g. if A ⃰ finds a solution at depth 5 using 52 nodes, then b* = 1.91
dominates
h2 dominates h1 if A* using h2 expands fewer nodes
hence, it is always better to use heuristic function with higher values, as long as they don’t overestimate
Inventing Heuristic Functions
problem: finding the best heuristic
relaxed problem - a problem with less restrictions on the operators
composite heuristic
if a collection of heuristics contains no single dominating heuristic, we could define
h(n) = max(h1(n), …, hₓ(n))
features
selecting and weighting the possible features of a state in order to evaluate the heuristic function
Heuristics For Constraint Satisfaction Problems (CSP)
constraint satisfaction problems consists of:
a set of variables that can take on values from a given domain
a set of constraints that specify properties of the solution
Choosing Next Variable to Assign Value
most-constrained-variable heuristic
used with forward checking
variable with fewest possible values is chosen to have value assigned
most-constraining-variable heuristic
assign value to variable that is involved in the largest number of constraints on other unassigned variables
Choosing Value to be Assigned to Variable
least-constraining-value heuristic
choose value that rules out the smallest number of values in variables connected to the current variable by constraints
Memory Bound Search
Iterative Deepening A* Search (IDA*)
similar to regular iterative deepening from chapter 3
a depth-first search modified to use f-cost limit
optimal and complete
has some difficulties in certain problem spaces that can be traced back to using too little memory
Simplified Memory-Bounded A* Search (SMA*)
makes use of all the available memory to carry out search
SMA ⃰ has the following properties
will utilize whatever memory is made available to it
avoids repeated states as far as its memory allows
is complete if available memory is sufficient to store the shallowest solution path
is optimal if enough memory is available to store the shallowest optimal solution path. otherwise, it returns the best solution that can be reached with the available memory
when enough memory is available for the entire search tree, the search is optimally efficient
when space runs out, drop nodes that are unpromising
Iterative Improvement Hill-Climbing Algorithms
Hill-Climbing Search
general idea: start with a complete configuration and to make modifications to improve its quality
make moves in direction of increasing value. It does not maintain a search tree, and it does not look beyond the immediate neighbors of the current state.
Hill climbing is often called “greedy local search” because it grabs a good neighbor state without thinking ahead about where to go next
3 drawbacks:
local maxima - algorithm would halt thinking it is the global maxima
plateaux - search would conduct random walk
ridges - steep sloping sides
variants of hill-climbing algorithms
stochastic hill-climbing
chooses at random from the uphill moves, the probability of selection can vary with the steepness of the uphill move
first choice hill climbing
implements stochastic hill climbing by generating successors randomly until one is generated that is better than the current state
random-restart hill-climbing
conducts a series of hill-climbing searches from random initial states
can use a fixed number of iterations or continue until the best saved result no longer improved for a certain number of iterations
Simulated Annealing
general idea: to escape local maxima allow search to take downhill steps
Iterative Improvements in Constraint Satisfaction Problems
heuristic repair
assign values to all variables, then apply modifications to move towards solution
min-conflicts heuristic
select value that results in the minimum number of conflicts with other variables