40
Chapter S:III III. Informed Search Best-First Search Best-First Search for State-Space Graphs Cost Functions for State-Space Graphs Evaluation of State-Space Graphs Algorithm A* BF* Variants Hybrid Strategies S:III-114 Informed Search © STEIN/LETTMANN 1998-2019

Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Chapter S:III

III. Informed Searchq Best-First Searchq Best-First Search for State-Space Graphsq Cost Functions for State-Space Graphsq Evaluation of State-Space Graphsq Algorithm A*

q BF* Variantsq Hybrid Strategies

S:III-114 Informed Search © STEIN/LETTMANN 1998-2019

Page 2: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

BF* VariantsFor trees G:

::::::::::::::::::Breadth-first

::::::::::::search is a special case of A*, where h = 0 and

c(n, n′) = 1 for all successors n′ of n.

S:III-115 Informed Search © STEIN/LETTMANN 1998-2019

Page 3: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

BF* VariantsFor trees G:

::::::::::::::::::Breadth-first

::::::::::::search is a special case of A*, where h = 0 and

c(n, n′) = 1 for all successors n′ of n.

s

Solved rest problem

Node on OPEN

Node on CLOSED1

1111

1

S:III-116 Informed Search © STEIN/LETTMANN 1998-2019

Page 4: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

BF* VariantsFor trees G:

::::::::::::::::::Breadth-first

::::::::::::search is a special case of A*, where h = 0 and

c(n, n′) = 1 for all successors n′ of n.

s

Solved rest problem

Node on OPEN

Node on CLOSED1

1111

1

f = 1

f = 2

f = 0

f = 2

f = 3

f = 2 f = 2

f = 1

S:III-117 Informed Search © STEIN/LETTMANN 1998-2019

Page 5: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

BF* VariantsFor trees G:

::::::::::::::::::Breadth-first

::::::::::::search is a special case of A*, where h = 0 and

c(n, n′) = 1 for all successors n′ of n.

s

Solved rest problem

Node on OPEN

Node on CLOSED1

1111

1

f = 1

f = 2

f = 0

f = 2

f = 3

f = 2 f = 2

f = 1

Proof (sketch)

1. g(n) defines the depth of n (consider path from n to s).2. f(n) = g(n).3. Breadth-first search ≡ the depth difference of nodes on OPEN is ≤ 1.

4. Assumption: Let n1, n2 be on OPEN, having a larger depth difference: f(n2)− f(n1) > 1.

5. ⇒ For the direct predecessor n0 of n2 holds: f(n0) = f(n2)− 1 > f(n1).6. ⇒ n1 must have been expanded before n0 (consider minimization of f under A*).7. ⇒ n1 must have been deleted from OPEN. Contradiction to 4.

S:III-118 Informed Search © STEIN/LETTMANN 1998-2019

Page 6: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

BF* VariantsFor trees G:

:::::::::::::::::::Uniform-cost

:::::::::::search is a special case of A*, where h = 0.

Proof (sketch)

See lab class.

S:III-119 Informed Search © STEIN/LETTMANN 1998-2019

Page 7: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

BF* VariantsFor trees G:

:::::::::::::::Depth-first

::::::::::::search is a special case of BF*, where f (n′) = f (n)− 1,

f (s) = 0, for all successors n′ of n.

S:III-120 Informed Search © STEIN/LETTMANN 1998-2019

Page 8: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

BF* VariantsFor trees G:

:::::::::::::::Depth-first

::::::::::::search is a special case of BF*, where f (n′) = f (n)− 1,

f (s) = 0, for all successors n′ of n.

s

Solved rest problem

Node on OPEN

Node on CLOSED-1

-1-1-1-1

-1

S:III-121 Informed Search © STEIN/LETTMANN 1998-2019

Page 9: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

BF* VariantsFor trees G:

:::::::::::::::Depth-first

::::::::::::search is a special case of BF*, where f (n′) = f (n)− 1,

f (s) = 0, for all successors n′ of n.

s

Solved rest problem

Node on OPEN

Node on CLOSED-1

-1-1-1-1

-1

f = -1

f = -2

f = 0

f = -2

f = -3

f = -1

S:III-122 Informed Search © STEIN/LETTMANN 1998-2019

Page 10: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

BF* VariantsFor trees G:

:::::::::::::::Depth-first

::::::::::::search is a special case of BF*, where f (n′) = f (n)− 1,

f (s) = 0, for all successors n′ of n.

s

Solved rest problem

Node on OPEN

Node on CLOSED-1

-1-1-1-1

-1

f = -1

f = -2

f = 0

f = -2

f = -3

f = -1

Proof (sketch)

1. f(n′) < f(n) ⇒ n′ was inserted on OPEN after n.f(n′) ≤ f(n) ⇔ n′ was inserted on OPEN after n.

2. Depth-first search ≡ the most recently inserted node on OPEN is expanded.3. Let n2 be the most recently inserted node on OPEN.

4. Assumption: Let n1 have been expanded before n2 ∧ f(n1) 6= f(n2).

5. ⇒ f(n1) < f(n2) (consider minimization of f under Z*).6. ⇒ n1 was inserted on OPEN after n2.7. ⇒ n2 is not the most recently inserted node on OPEN. Contradiction to 3.

S:III-123 Informed Search © STEIN/LETTMANN 1998-2019

Page 11: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

BF* VariantsGreedy best-first search is a special case of BF*, where f (n) = h(n), for all nodes n.

S:III-124 Informed Search © STEIN/LETTMANN 1998-2019

Page 12: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

BF* VariantsGreedy best-first search is a special case of BF*, where f (n) = h(n), for all nodes n.

s

Solved rest problem

Node on OPEN

Node on CLOSED

h=0

h=7h=5

h=9 h=3

h=8 h=13 h=22

S:III-125 Informed Search © STEIN/LETTMANN 1998-2019

Page 13: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

BF* VariantsGreedy best-first search is a special case of BF*, where f (n) = h(n), for all nodes n.

s

Solved rest problem

Node on OPEN

Node on CLOSED

h=0

h=7h=5

h=9 h=3

h=8 h=13 h=22

S:III-126 Informed Search © STEIN/LETTMANN 1998-2019

Page 14: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

BF* VariantsGreedy best-first search is a special case of BF*, where f (n) = h(n), for all nodes n.

s

Solved rest problem

Node on OPEN

Node on CLOSED

h=0

h=7h=5

h=9 h=3

h=8 h=13 h=22

q Greedy best-first search is greedily going for early termination (assuming small h-valuesindicate small remaining problem, i.e., trusting in the Small-is-Quick Principle).

q Greedy best-first search represents an abuse of the evaluation function: although it is easy todefine f recursively, the path cost concept used in computation of h is not the path costestimated by f .

q Greedy best-first search can take early found alternatives into account, h-values of OPENnodes were misleading.

q The name "Greedy Search" is often used as synonym for "Hill-Climbing".

S:III-127 Informed Search © STEIN/LETTMANN 1998-2019

Page 15: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

BF* VariantsOPEN List Restriction: Hill-Climbing (HC)

Hill-climbing is an informed, irrevocable search strategy.

HC characteristics:

q local or greedy optimization:take the direction of steepest ascend (merit) / steepest descend (cost)

q “never look back” :alternatives are not remembered Ü no OPEN/CLOSED lists

q usually low computational effort

q a strategy that is often applied by humans

s

γ

s

γ

��

�S:III-128 Informed Search © STEIN/LETTMANN 1998-2019

Page 16: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Remarks:

q The original version of hill-climbing is a local search strategy (i.e., hill-climbing is working onsolution candidates), whereas best-first algorithms are working on solution bases that aresets of solution candidates (any continuation of the initial sequence of solution steps).For the 8-queens problem, a solution candidate is a positioning of eight queens on the board.The cost of a positioning is computed from the number of attacks between queens. Bymoving single queens on the board to adjacent fields, the positioning can be changed.Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the mostpromising one.Obviously, this neighborhood could be computed by a successors(.) function and quality/costvalues can be assigned by a evaluation function f . (Applied to solution candidates, f doesnot employ estimates.)As hill-climbing can be caught in a local maximum, restarts with a randomly chosen initialsolution candidate can help to improve the solution.

S:III-129 Informed Search © STEIN/LETTMANN 1998-2019

Page 17: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Remarks:

q For OR graph search, the original problem "Find a solution path for s." is transformed into theproblem "Find a path from s to a node (state) that is similar to a goal node." The degree ofdissimilarity is the cost of such a path. Dissimilarity can be defined as estimated optimumremaining cost which is computed by a heuristic function h.

Using this translation, any path is a solution path and a neighborhood can be defined by nodeexpansion of its tip node. Thereby hill-climbing becomes applicable.

The following pseudocode assumes this transformation. When identifying a local maximum, acheck by ?(.) will identify solution paths for the original problem. Of course, random restartsare not meaningful in this context, because the initial problem given by s is to be solved.

Using a hill-climbing approach in this way requires powerful heuristic functions: everyexpansion step must lead to a decrease (cost) resp. increase (merit) of the heuristic values,h(n′) < h(n) resp. h(n′) > h(n).

S:III-130 Informed Search © STEIN/LETTMANN 1998-2019

Page 18: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

BF* Variants

Algorithm: HC (Hill-Climbing) Adaption for OR graph searchInput: s. Start node representing the initial problem.

successors(n). Returns the successors of node n.?(n). Predicate that is True if n represents a solution path.h(n). Heuristic cost estimation for the remaining problem defined by node n.

Output: A node γ representing a solution path or the symbol Fail .

S:III-131 Informed Search © STEIN/LETTMANN 1998-2019

Page 19: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

BF* Variants [::::::DFS] [

::::BT]

Algorithm: HC (Hill-Climbing) Adaption for OR graph searchInput: s. Start node representing the initial problem.

successors(n). Returns the successors of node n.?(n). Predicate that is True if n represents a solution path.h(n). Heuristic cost estimation for the remaining problem defined by node n.

Output: A node γ representing a solution path or the symbol Fail .

HC(s, successors, ?, h)

1. n = s;

2. nopt = s;

3. LOOP

4. IF ?(n) THEN RETURN(n);

5. FOREACH n′ IN successors(n) DO // Expand n.set_backpointer(n′, n);IF (h(n′) < h(nopt)) // Compare optimum remaining cost estimates.THEN nopt = n′; // Remember optimum successor.

ENDDO

6. IF (nopt = n)THEN RETURN(Fail); // We could not improve.ELSE n = nopt; // Continue with the best successor.

7. ENDLOOP

S:III-132 Informed Search © STEIN/LETTMANN 1998-2019

Page 20: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Remarks:

q Using the evaluation function f instead of h in the above version of hill-climbing is notmeaningful, since cost values usually increase along a path when using an optimisticevaluation function f . A disadvantage of using h instead of f is that the guiding function is nolonger directly related to solution path cost.Since the solution bases that are compared share the backpointer path of the expandednode, the states (aka remaining problems) in node n and its successors (sometimes also theedges from n to the successors) are considered. When using an additive cost measure in arecursive cost function, this comparison is sufficient.

q In the:::::::::::::::introduction, heuristic functions are given for some of the example problems. Informally

a hill-climbing approach was described for using these heuristic functions in a search forsolutions. The above version of hill-climbing can be directly applied to these problems.

– For the 8-queens problem, the heuristic functions can be seen as describing a merit (i.e.,the potential of positioning further queens): the higher, the better.

– For the 8-puzzle problem the heuristic functions describe a cost (i.e., the distance to thetarget configuration on the board): the lower, the better.

– For the map problem and for TSP, the heuristic functions compute the Euclidean distanceto the target position, resp. the sum cost of a cost-minimal spanning tree / degree-2graph. Again, these values can be seen as cost values.However, in both problems the distance of the edge traversed last could be taken intoaccount, i.e., for a successor n′ the value h(n′) is compared to h(n) for the parent node n,but comparisons between successors n′, n′′ use c(n, n′) + h(n′) and c(n, n′′) + h(n′′).

S:III-133 Informed Search © STEIN/LETTMANN 1998-2019

Page 21: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

BF* VariantsOPEN List Restriction: Best-First Beam Search [Rich & Knight 1991]

Characteristics:

q Best-first search is used with an OPEN list of limited size k (the beam-width).

q If OPEN exceeds its size limit, nodes with worst f -values are discarded untilsize limit is adhered to.

OPEN List Restriction: Breadth-First Beam Search [Lowerre 1976, Bisiani 1981]

Characteristics:

q All nodes of the current level (initially only s) are expanded.

q Only the best of all these successors are kept and used for the next level.(For the selection of these nodes "a threshold of acceptability" can be defined [Lowerre 1976].

A simpler option is to restrict the next level to at most k nodes with best f -values.)

Operationalization for both variants:

q A cleanup_closed function is needed to prevent CLOSED from growinguncontrollably.

S:III-134 Informed Search © STEIN/LETTMANN 1998-2019

Page 22: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Remarks:

q For k = 1, best-first beam search is similar to the above version of hill-climbing search.However, there is an important difference:

Since f -values of successors are not compared to the f -value of the parent, best-firstbeam search will continue search even in case a local optimum is found.

q For k = 1, best-first beam search is an informed, irrevocable search strategy.

q Similar to hill-climbing, a low-quality evaluation function f may lead the search into parts ofthe search space graph that do not contain solution paths. Completeness is endangered.

S:III-135 Informed Search © STEIN/LETTMANN 1998-2019

Page 23: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Hybrid StrategiesSpectrum of Search Strategies

The search strategies

q Hill-climbing irrevocable decisions, consideration of newest alternatives

q Informed backtracking tentative decisions, consideration of newest alternatives

q Best-first search tentative decisions, consideration of all alternatives

form the extremal points within the spectrum of search strategies, based on thefollowing dimensions:

R Recovery.How many previously suspended alternatives (nodes) are reconsidered afterfinding a dead end?

S Scope.How many alternatives (nodes) are considered for each expansion?

S:III-136 Informed Search © STEIN/LETTMANN 1998-2019

Page 24: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Hybrid StrategiesSpectrum of Search Strategies

The search strategies

q Hill-climbing irrevocable decisions, consideration of newest alternatives

q Informed backtracking tentative decisions, consideration of newest alternatives

q Best-first search tentative decisions, consideration of all alternatives

form the extremal points within the spectrum of search strategies, based on thefollowing dimensions:

R Recovery.How many previously suspended alternatives (nodes) are reconsidered afterfinding a dead end?

S Scope.How many alternatives (nodes) are considered for each expansion?

S:III-137 Informed Search © STEIN/LETTMANN 1998-2019

Page 25: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Hybrid StrategiesSpectrum of Search Strategies

Scope: Amount ofalternatives consideredfor each expansion

Tentativedecisions

Recovery: Amount ofsuspended alternativesreconsidered indead end situations

Consideration of onlynewest alternatives

Consideration ofall alternatives

R

S

Irrevocabledecisions

The large scope of best-first search requires a high memory load.This load can be reduced by mixing it with backtracking.

S:III-138 Informed Search © STEIN/LETTMANN 1998-2019

Page 26: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Hybrid StrategiesSpectrum of Search Strategies

Scope: Amount ofalternatives consideredfor each expansion

Tentativedecisions

Recovery: Amount ofsuspended alternativesreconsidered indead end situations

Consideration of onlynewest alternatives

Consideration ofall alternatives

R

S

Irrevocabledecisions

Hill-Climbing

Best-First Search

Backtracking

The large scope of best-first search requires a high memory load.This load can be reduced by mixing it with backtracking.

S:III-139 Informed Search © STEIN/LETTMANN 1998-2019

Page 27: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Hybrid StrategiesSpectrum of Search Strategies

Scope: Amount ofalternatives consideredfor each expansion

Tentativedecisions

Recovery: Amount ofsuspended alternativesreconsidered indead end situations

Consideration of onlynewest alternatives

Consideration ofall alternatives

R

S

Irrevocabledecisions

Hill-Climbing

Best-First Search

Backtracking

q The large scope of best-first search requires a high memory load.q This load can be reduced by mixing it with backtracking.

S:III-140 Informed Search © STEIN/LETTMANN 1998-2019

Page 28: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Remarks:

q Recall that the memory consumption of best-first search is an (asymptotically) exponentialfunction of the search depth.

q Hill-climbing is the most efficient strategy, but its effectiveness (solution quality) can only beguaranteed for problems that can be solved with a greedy approach.

q Informed backtracking (i.e., generate successors with some quality ordering) requires not asmuch memory as best-first search, but usually needs more time as its scope is limited.

q Without a highly informed heuristic h, the degeneration of best-first strategies down to auniform-cost search is typical and should be expected as the normal case.

S:III-141 Informed Search © STEIN/LETTMANN 1998-2019

Page 29: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Hybrid StrategiesStrategy 1: BF at Top

s

Characteristics:

q Best-first search is applied at the top of the search space graph.

q Backtracking is applied at the bottom of the search space graph.

Operationalization:

1. Best-first search is applied until a memory allotment of size M0 is exhausted.

2. Then backtracking starts with a most promising node n′ on OPEN.

3. If backtracking fails, it restarts with the next most promising OPEN node.

S:III-142 Informed Search © STEIN/LETTMANN 1998-2019

Page 30: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Hybrid StrategiesStrategy 2: BF at Bottom

s

d0

Characteristics:

q Backtracking is applied at the top of the search space graph.

q Best-first search is applied at the bottom of the search space graph.

Operationalization:

1. Backtracking is applied until the search depth bound d0 is reached.

2. Then best-first search starts with the node at depth d0.

3. If best-first search fails, it restarts with the next node at depth d0 found by backtracking.

S:III-143 Informed Search © STEIN/LETTMANN 1998-2019

Page 31: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Remarks:

q The depth bound d0 in Strategy 2 must be chosen carefully to avoid best-first search runningout of memory. Hence, this strategy is more involved than Strategy 1 where the switchbetween best-first search and backtracking is triggered by the exhausted memory.

q If a sound depth bound d0 is available, Strategy 2 (best-first search at bottom) is usuallysuperior to Strategy 1 (best-first search at top). Q. Why?

S:III-144 Informed Search © STEIN/LETTMANN 1998-2019

Page 32: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Hybrid StrategiesStrategy 3: Extended Expansion

s

Characteristics:

q Best-first search acts locally to generate a restricted number of promising nodes.

q Informed depth-first search acts globally, using best-first as an “extended node expansion”.

Operationalization:

1. An informed depth-first search selects the nodes n for expansion.

2. But a best-first search with a memory allotment of size M0 is used to “expand” n.

3. The nodes on OPEN are returned to the depth-first search as “direct successors” of n.

S:III-145 Informed Search © STEIN/LETTMANN 1998-2019

Page 33: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Hybrid StrategiesStrategy 3: Extended Expansion

s

Characteristics:

q Best-first search acts locally to generate a restricted number of promising nodes.

q Informed depth-first search acts globally, using best-first as an “extended node expansion”.

Operationalization:

1. An informed depth-first search selects the nodes n for expansion.

2. But a best-first search with a memory allotment of size M0 is used to “expand” n.

3. The nodes on OPEN are returned to the depth-first search as “direct successors” of n.

S:III-146 Informed Search © STEIN/LETTMANN 1998-2019

Page 34: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Remarks:

q Strategy 3 is an informed depth-first search whose node expansion is operationalized via amemory-restricted best-first search.

q Q. What is the asymptotic memory consumption of Strategy 3 in relation to the search depth?

S:III-147 Informed Search © STEIN/LETTMANN 1998-2019

Page 35: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Hybrid StrategiesStrategy 4: IDA* [Korf 1985]

Characteristics:

q Depth-first search is used in combination with an iterative deepeningapproach for f -values.

q Nodes are considered only if their f -values do not exceed a given threshold.

Operationalization:

1. limit is initialized with f (s).

2. In depth-first search, only nodes are considered with f (n) ≤ limit .

3. If depth-first search fails, limit is increased to the minimum cost of all f -valuesthat exceeded the current threshold and depth-first search is rerun.

S:III-148 Informed Search © STEIN/LETTMANN 1998-2019

Page 36: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Remarks:

q IDA* always finds a cheapest solution path if the heuristic is admissible, or in other wordsnever overestimates the actual cost to a goal node.

q IDA* uses space linear in the length of a cheapest solution.

q IDA* expands the same number of nodes, asymptotically, as A* in an exponential tree search.

S:III-149 Informed Search © STEIN/LETTMANN 1998-2019

Page 37: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Hybrid StrategiesStrategy 5: Focal Search [Ibaraki 1978]

Characteristics:

q An informed depth-first search is used as basic strategy.

q Nodes are selected from newly generated nodes and the best nodesencountered so far.

Operationalization:

q The informed depth-first search expands the cheapest node n from its list ofalternatives.

q For the next expansion, it chooses from the newly generated nodes and thek best nodes (without n) from the previous alternatives.

S:III-150 Informed Search © STEIN/LETTMANN 1998-2019

Page 38: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Remarks:

q For k = 0 this is identical to an informed depth-first search.

q For k =∞ this is identical to a best-first search.

q Memory consumption (without proof): O(b · dk+1), where b denotes the branching degreeand d the search depth.

q An advantage of Strategy 5 is that its memory consumption can be controlled via the singleparameter k.

q Differences to beam search:

– In focal search no nodes are discarded. Therefore, focal search will never miss asolution.

– In best-first beam search the OPEN list is of limited size.

S:III-151 Informed Search © STEIN/LETTMANN 1998-2019

Page 39: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Hybrid StrategiesStrategy 6: Staged Search [Nilson 1971]

s

Characteristics:

q Best-first search acts locally to generate a restricted number of promising nodes.

q Hill-climbing acts globally, but by retaining a set of nodes.

Operationalization:

1. Best-first search is applied until a memory allotment of size M0 is exhausted.

2. Then only the cheapest OPEN nodes (and their pointer-paths) are retained.

3. Best-first search continues until Step 1. is reached again.

S:III-152 Informed Search © STEIN/LETTMANN 1998-2019

Page 40: Chapter S:III · Hill-climbing will evaluate the neighborhood of a solution candidate and switch to the most promising one. Obviously, this neighborhood could be computed by a successors(:)

Remarks:

q Staged search can be considered as a combination of best-first search and hill-climbing.While a pure hill-climbing discards all nodes except one, staged search discards all nodesexcept a small subset.

q Staged search addresses the needs of extreme memory restrictions and tight runtimebounds.

q Recall that the Strategies 1–5 are complete with regard to recovery, but that Strategy 6, HillClimbing, and Best-First Beam Search are not.

S:III-153 Informed Search © STEIN/LETTMANN 1998-2019