Download presentation
Presentation is loading. Please wait.
1
More advanced aspects of search Extensions of A*
2
Iterated deepening A* Simplified Memory-bounded A*
3
Iterative-deepening A*
4
4 Memory problems with A* A* is similar to breadth-first: Breadth-first d = 1 d = 2 d = 3 d = 4 Expand by depth-layers Here: 2 extensions of A* that improve memory usage. f1 f2 f3 f4 A* Expands by f-contours
5
5Depth-first in each f- contour Perform depth-first search LIMITED to some f-bound. If goal found: ok. Else: increase de f- bound and restart. Iterative deepening A* f4 How to establish the f-bounds? - initially: f(S) - initially: f(S) generate all successors record the minimal f(succ) > f(S) Continue with minimal f(succ) instead of f(S) f3 f2 f1
6
6 Example: Sf=100 Af=120Bf=130Cf=120 Df=140Gf=125Ef=140Ff=125 f-limited, f-bound = 100 f-new = 120
7
7 Example: Sf=100 Af=120Bf=130Cf=120 Df=140Gf=125Ef=140Ff=125 f-limited, f-bound = 120 f-new = 125
8
8 Example: Sf=100 Af=120Bf=130Cf=120 Df=140Gf=125Ef=140Ff=125 f-limited, f-bound = 125 SUCCESS
9
9 f -limited search: 1. QUEUE <-- path only containing the root; f-bound ; f-bound ; f-new <-- f-new <-- 2. WHILE QUEUE is not empty AND goal is not reached DO remove the first path from the QUEUE; DO remove the first path from the QUEUE; create new paths (to all children); create new paths (to all children); reject the new paths with loops; reject the new paths with loops; add the new paths with f(path) f-bound add the new paths with f(path) f-bound to front of QUEUE; to front of QUEUE; f-new <-- minimum of current f-new and f-new <-- minimum of current f-new and of the minimum of new f-values which are of the minimum of new f-values which are larger than f-bound larger than f-bound 3. IF goal reached THEN success; ELSE report f-new ;
10
10 Iterative deepening A*: 1. f-bound <-- f(S) 2. WHILE goal is not reached DO perform f-limited search; DO perform f-limited search; f-bound <-- f-new f-bound <-- f-new
11
11 Properties of IDA* Complete and optimal: under the same conditions as for A* Memory: Let be the minimal cost of an arc: == O( b* (cost(B) / ) ) Speed: depends very strongly on the number of f-contours there are !! In the worst case: f(p) f(q) for every 2 paths: 1 + 2 + ….+ N = O(N 2 )
12
12 Why is this optimal, even without monotonicity ?? S AB CDFE 100 120 120 1509060 140 In absence of Monotonicity: we can have search spaces like: If f can decrease, how can we be sure that the first goal reached is the optimal one ???
13
13 Properties: practical If there are only a reduced number of different contours: IDA* is one of the very best optimal search techniques ! Example: the 8-puzzle But: also for MANY other practical problems Else, the gain of the extended f-contour is not sufficient to compensate recalculating the previous In such cases: increase f-bound by a fixed number at each iteration: effects: less re-computations, BUT: optimality is lost: obtained solution can deviate up to
14
Simplified Memory-bounded A*
15
15 Simplified Memory-bounded A* Fairly complex algorithm. If memory is full and we need to generate an extra node (C): Remove the highest f- value leaf from QUEUE (A). Remember the f-value of the best ‘forgotten’ child in each parent node (15 in S). S AB C 13 15 13 memory of 3 nodes only Optimizes A* to work within reduced memory. Key idea: (15) 18 B
16
16 Generate children 1 by 1 When expanding a node (S), only add its children 1 at a time to QUEUE. we use left-to-right Avoids memory overflow and allows monitoring of whether we need to delete another node S AB 13 First add A, later B AB
17
17 Too long path: give up If extending a node would produce a path longer than memory: give up on this path (C). Set the f-value of the node (C) to (to remember that we can’t find a path here) S B C 13 13 memory of 3 nodes only D 18 B C
18
18 Adjust f-values S AB 13 15 24 If all children M of a node N have been explored and for all M: f(S...M) f(S...N) then reset: f(S…N) = min { f(S…M) | M child of N} A path through N needs to go through 1 of its children ! better estimate for f(S) 15
19
19 SMA*: an example: S AB CG1DG2 EG3G4F 0+12=12 8+5=13 10+5=15 24+0=24 16+2=1820+0=20 20+5=25 30+5=35 30+0=30 24+0=24 24+5=29 10 8 10 10 8 16 1010 8 8 S12S12 A 15 S12A 15 B 13 S 13 B 13 A 15 A 15 D 18 (15) 1312
20
20 S 13 B D 13 (15) 13 15 S AB CG1DG2 EG3G4F0+12=128+5=13 10+5=15 24+0=24 16+2=1820+0=20 20+5=25 30+5=35 30+0=30 24+0=24 24+5=29 10 8 10 10 8 16 1010 8 8 S 13 (15) B 13 D Example: continued D (()(() G2 24 13 24 S 15 B 24 (()(()(15)G2 24 (15) G2 24 (()(() A 15 S 15 A 15 B 24 B 24 (24) C 25 S 15 (24) A C 15 C ()() G1 20 15 20 15 20
21
21 SMA*: properties: Complete: If available memory allows to store the shortest path. Optimal: If available memory allows to store the best path. Otherwise: returns the best path that fits in memory. Memory: Uses whatever memory available. Speed: If enough memory to store entire tree: same as A*
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.