automatic creation of search heuristics
play

Automatic Creation of Search Heuristics Stefan Edelkamp 1 - PowerPoint PPT Presentation

Automatic Creation of Search Heuristics Stefan Edelkamp 1 Overview - Automatic Creation of Heuristics - Macro Problem Solving - Hierarchical A* and Voltortas Theorem - Pattern Databases - Disjoint Pattern Databases - Multiple, Bounded,


  1. Automatic Creation of Search Heuristics Stefan Edelkamp

  2. 1 Overview - Automatic Creation of Heuristics - Macro Problem Solving - Hierarchical A* and Voltorta’s Theorem - Pattern Databases - Disjoint Pattern Databases - Multiple, Bounded, Symmetrical, Dual, and Secondary Databases Overview 1

  3. 2 History History on automated creation of admissible heuristics: Gaschnik (1979), Pearl (1984), Prititis (1993), Guida and Somalvico (1979) - Korf: Macro Problem Solver, Learning Real-Time A* - Valtorta: A result on complexity of heuristic estimates for A* - Holte et al.’s Hierarchical A*: Searching Abstraction Hierarchies Efficiently - Recent work: Pattern/Abstraction Databases On-line computation in Hierarchical A* and its precursors probably main difference from off-line calculations that are applied in construction of pattern databases History 2

  4. 3 Macro Problem Solving Macro Problem Solver constructs a table that contains macros solving subproblems Search: Solver looks at table entries to sequentially improve current state to goal Eight-Puzzle example: operators labeled by direction blank is moving Table Structure: entry in row r and column c denotes operator sequence to move tile in position r into c Invariance: after executing macro, tiles in position 1 to r − 1 remain correctly placed Macro Problem Solving 3

  5. Macro Table for the Eight-Puzzle 0 1 2 3 4 5 6 0 1 DR 2 D LURD 3 DL URDL URDL LURD 4 L RULD RULD LURRD LURD LULDR 5 UL DRUL RDLU RULD RDLU DLUR RULD RDLU ULDR URDL 6 U DLUR DRU DLUU DRUL LURRD ULDR ULD RDRU DLURU LLDR LLDR 7 UR LDRU ULDDR LDRUL DLUR DRULDL DLUR ULDR ULURD URDRU DRUL URRDLU LLDR 8 R ULDR LDRR LURDR LDRRUL DRUL LDRU UULD ULLDR LDRU RDLU Macro Problem Solving 4

  6. Running the Table For tile 1 ≤ i ≤ 6 , determine current position c and goal r and apply macro ( c, r ) 1 1 1 8 3 1 2 6 3 6 3 3 ULDDR UL LURD 8 4 7 8 7 6 4 6 4 ULURD 2 5 2 5 2 5 5 7 8 7 4 c=0, r=5 c=1, r=2 c=2, r=7 c=3, r=3 DRUL 1 2 1 2 1 2 3 3 3 1 2 3 DLUR DLUR 4 7 6 6 4 4 8 4 RDLU 5 7 7 8 8 7 8 6 5 5 6 5 c=4, r=4 c=5, r=7 c=6, r=7 worst case solution (sum column maxima): 2 + 12 + 10 + 14 + 8 + 14 + 4 = 64 average: 12 / 9 + 52 / 8 + 40 / 7 + 58 / 6 + 22 / 5 + 38 / 4 + 8 / 3 = 39 . 78 Macro Problem Solving 5

  7. Construction . . . with Backward-DFS or Backward-BFS starting from the set of goals - backward operators m − 1 do not necessarily need to be valid - given vector representation of current position p = ( p 0 , . . . , p k ) , then m − 1 can be reached from goal position p ′ = ( p ′ 0 , . . . , p ′ k ) - Column c ( m ) of m , which transforms p into p ′ : length of longest common prefix of p and p ′ , i.e., c ( m ) = min { i ∈ { 0 , . . . , k − 1 } | p i � = p ′ i } - Row r ( m ) of macro m : position on which p c ( m ) is located, which has to be moved to c ( m ) in next macro application Macro Problem Solving 6

  8. Example - m − 1 = LDRU alters goal position p ′ = (0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8) into p = (0 , 1 , 2 , 3 , 4 , 5 , 8 , 6 , 7) - its inverse m is DLUR ⇒ c ( m ) = 6 and r ( m ) = 7 , matching last macro application in table - larger problems: BFS exhaust memory resources before table entry fixed - larger tables require pattern database heuristic search Macro Problem Solving 7

  9. 4 Patterns and Domain Abstraction - pattern: refers to vector representation v ( u ) , each position i contains an assignment to variable v i , i ∈ { 1 , . . . , k } - specialized pattern: state with one or more constants replaced by don’t cares - generalized pattern: each variable v i with domain D i is mapped to abstract domain A i , i ∈ { 1 , . . . , k } - start and goal pattern: making same substitutions in start and goal states - domain abstraction: mapping stating which assignment to replace by which other Patterns and Domain Abstraction 8

  10. Two Examples in Eight-Puzzle 1. Tiles 1, 2, 7 replaced by don’t care x ⇒ φ 1 ( v ) = v ′ with v ′ i = v i if v i ∈ { 0 , 3 , 4 , 5 , 6 , 8 } , and v i = x , otherwise 2. φ 2 : also map tiles 3 and 4 to y , and tiles 6 and 8 to z Granularity: vector indicating how many constants in the original domain are mapped to each constant in the abstract domain ⇒ gran ( φ 2 ) = (3 , 2 , 2 , 1 , 1) - 3 constants are mapped to x - 2 are mapped to each of y and z - constants 5 and 0 (the blank) remain unique Patterns and Domain Abstraction 9

  11. 5 Embeddings and Homomorphisms • embedding: earliest and most commonly studied type of abstraction transformation - informally, φ embedding transformation if it adds edges to S - E.g., macro-operators, dropped preconditions • homomorphism: other main type of abstraction transformation - informally, homomorphism φ groups together several states in S to create single abstract state - E.g., drop predicate entirely from state space description (Knoblock 1994) Embeddings and Homomorphisms 10

  12. Hierarchical A* Abstraction works by replacing one state space by another that is easier to search Hierarchical A* is an versions that computes distances of an abstract to the abstract goal on-the-fly, by means for each node that is expanded - different to earlier approaches (exploring abstract space from scratch), Hierarchical A* uses caching to avoid repeated expansion of states in abstract space - restricts to state space embedding that are homomorphisms Embeddings and Homomorphisms 11

  13. Voltorta Theorem Theorem If state space S is embedded in S ′ and h is computed by blind BFS in v then A* using h will expand every state that is expanded by BFS ⇒ by re-computing heuristic estimates for each state this option cannot possibly speed-up search - Absolver II: 1st system to break this barrier - Hierarchical A*: subsequent one Embeddings and Homomorphisms 12

  14. Example N × N grid, abstracted by ignoring 2nd coordinate - goal state is ( N, 1) - initial state (1 , 1) Theorem of Voltorta ⇒ A* expands Ω( N 2 ) nodes Main Observation: Search for h ( s ) also generates value of h ( u ) , ∀ u ∈ S ′ - abstraction yields a perfect heuristic on solution path - Hierarchical A* will expand optimum of O ( N ) nodes Embeddings and Homomorphisms 13

  15. Proof of Voltorta’s Theorem When A* terminates, u closed, open, or unvisited u closed ⇒ it will have been expanded u open ⇒ h φ ( u ) must have been computed - h φ ( u ) computed by search starting at φ ( u ) - φ ( u ) / ∈ φ ( T ) ⇒ 1st step is to expand φ ( u ) - φ ( u ) ∈ φ ( T ) ⇒ h φ ( u ) = 0 , and u itself is necessarily expanded u unvisited ⇒ ∀ paths from s to u , ∃ never expanded state added to Open Let w be any such state on shortest path from s to u - w opened ⇒ h φ ( w ) must have been computed Embeddings and Homomorphisms 14

  16. Proof (ctd) To show: in computing h φ ( w ) , φ ( u ) expanded - u necessarily expanded by BFS ⇒ δ ( s, u ) < δ ( s, T ) - w on shortest path ⇒ δ ( s, w ) + δ ( w, u ) < δ ( s, T ) - M never expanded by A* ⇒ δ ( s, w ) + h φ ( w ) ≥ δ ( s, T ) - combining the two inequalities: δ ( w, u ) < h φ ( w ) = δ φ ( w, T ) - homomorphism: δ φ ( w, u ) ≤ δ ( w, u ) ⇒ δ φ ( w, u ) < δ ( w, T ) ⇒ φ ( u ) necessarily expanded Embeddings and Homomorphisms 15

  17. Consistency Theorem h φ is consistent h φ consistent ⇒ ∀ u, v ∈ S : h φ ( u ) ≤ δ ( u, , v ) + h φ ( v ) - δ φ ( u, T ) shortest path ⇒ δ φ ( u, T ) ≤ δ φ ( u, v ) + δ φ ( v, T ) for all u and v - substituting h φ : h φ ( u ) ≤ δ φ ( u, v ) + h φ ( v ) for all u and v - homomorphism: δ φ ( u, v ) ≤ δ ( u, v ) ⇒ h φ ( u ) ≤ δ ( u, v ) + h φ ( v ) for all u and v Embeddings and Homomorphisms 16

  18. 6 Pattern Databases Name inspired by ( n 2 − 1) -Puzzle, where pattern is selection of tiles Pattern database: stores all pattern together with their shortest path distance on simplified board to the pattern for goal Construction PDB: prior to overall search in a Backward BFS starting with goal pattern and using inverse abstract state transitions Search in original space: pattern selected in active state with stored distance value as estimator function Pattern Databases 17

  19. Example ( n 2 − 1) -Puzzle fringe and the corner pattern (databases): 3 7 11 8 9 10 12 13 14 15 12 13 14 15 Multiple pattern databases: Pattern Databases 18

  20. Maximizing Pattern Databases Shortest path distance in pattern space ≤ shortest path distance in the original one ⇒ pattern databases heuristics are admissible Combined pattern databases: - take maximum of heuristic values provided by different databases - use result as admissible heuristic ⇒ optimal solutions for random instances to Rubik’s Cube Pattern Databases 19

  21. Disjoint Pattern Databases For sliding-tile puzzles only one tile can move at a time ⇒ disjoint pattern databases count moves of pattern tiles only General Problem: different pattern databases may count operators twice, since an operator can have a non-trivial image under more than one relaxation Assumption: Two pattern databases D φ 1 and D φ 2 are disjoint, if for all non-trivial O ′ ∈ O φ 1 , O ′′ ∈ O φ 2 we have φ − 1 1 ( O ′ ) ∩ φ − 1 2 ( O ′′ ) = ∅ Finding partitions for pairwise disjoint pattern databases automatically not trivial ⇒ assign 1 to each operator only in 1 relaxation ⇒ sum of retrieved pattern database values preserves admissibility, while being more accurate Pattern Databases 20

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend