Dual lookups in Pattern Databases

of 29 /29
1 Dual lookups in Pattern Databases Ariel Felner, Ben- Gurion Univ. Israel Uzi Zahavi, Bar-Ilan Univ. Israel Jonathan Schaeffer, Univ. of Alberta, Canada Robert C. Holte, Univ. of Alberta, Canada

Embed Size (px)


Dual lookups in Pattern Databases. Ariel Felner, Ben-Gurion Univ. Israel Uzi Zahavi, Bar-Ilan Univ. Israel Jonathan Schaeffer, Univ. of Alberta, Canada Robert C. Holte, Univ. of Alberta, Canada. Overview. Heuristic search and A* Test domains Pattern databases - PowerPoint PPT Presentation

Transcript of Dual lookups in Pattern Databases

  • Dual lookups in Pattern Databases Ariel Felner, Ben-Gurion Univ. Israel Uzi Zahavi, Bar-Ilan Univ. Israel Jonathan Schaeffer, Univ. of Alberta, Canada Robert C. Holte, Univ. of Alberta, Canada

  • OverviewHeuristic search and A*Test domainsPattern databasesDual lookups in pattern databasesExperimental results

  • A*Best-first search with a cost function of f(n)=g(n)+h(n)g(n): actual distance from the initial state to n h(n): estimated remained distance from n to the goal state. h(n) is admissible if it is always underestimating

    Examples of h: Air distance, Manhattan Distance

  • Attributes of A*

    If h(n) is admissible then A* is guaranteed to return an optimal (shortest) solution

    A* is admissible, complete and optimally effective. [Pearl & Dechter 84]

    IDA* is a linear space version of A* [Korf 85] which uses DFS iterations.

  • Domains15 puzzle10^13 statesFirst solved by [Korf 85] with IDA* and Manhattan distanceTakes 53 seconds24 puzzle10^24 statesFirst solved by [Korf 96]Takes 2 days

  • DomainsRubiks cube10^19 statesFirst solved by [Korf 97]Takes 2 days to solve

  • (n,k) Top Spin Puzzlen tokens arranged in a ringStates: any possible permutation of the tokensOperators: Any k consecutive tokens can be reversedThe (17,4) version has 10^13 statesThe (20,4) version has 10^18 states

  • How to improve search?Enhanced algorithms: Perimeter-search [Delinberg and Nilson 95]RBFS [Korf 93]Frontier-search [Korf and Zang 2003] Breadth-first heuristic search [Zhou and Hansen 04]

    They all try to better explore the search tree.

    Better heuristics: more parts of the search tree will be pruned.

  • Subproblems-AbstractionsMany problems can be abstracted into subproblems that must be also solved. A solution to the subproblem is a lower bound on the entire problem.Example: Rubiks cube [Korf 97]Problem: 3x3x3 Rubiks cube Subproblem: 2x2x2 Corner cubies.

  • Pattern Databases heuristicsA pattern database [Culbreson & Schaeffer 96] is a lookup table that stores solutions to all configurations of the subproblem / abstraction / pattern.This table is used as a heuristic during the search.Example: Rubiks cube. Has 10^19 States.The corner cubies subproblem has 88 Million states A table with 88 Million entries fits in memory [Korf 97].PatternspaceSearch space Mapping/Projection

  • Example - 15 puzzleHow many moves do we need to move tiles 2,3,6,7 from locations 8,12,13,14 to their goal locationsThe solution to this is located in PDB[8][12][13][14]=18

  • Disjoint Additive PDBs (DADB)Values of disjoint databases can be added and are still admissible [Korf & Felner: AIJ-02, Felner, Korf & Hanan: JAIR-04]

    If you have many PDBS, take their maximum

  • DADB:Tile puzzles5-5-56-6-37-86-6-6-6[Korf, AAAI 2005]

  • Symmetries in PDBsSymmetric lookups were already performed by the first PDB paper of [Culberson & Schaeffer 96]examples Tile puzzles: reflect the tiles about the main diagonal. Rubiks cube: rotate the cubeWe can take the maximum among the different lookupsThese are all geometrical symmetriesWe suggest a new type of symmetry!!8877

  • Regular and dual representationRegular representation of a problem: Variables objects (tiles, cubies etc,) Values locationsDual representation: Variables locations Values objects

  • Regular vs. Dual lookups in PDBsRegular question: Where are tiles {2,3,6,7} and how many moves are needed to gather them to their goal locations?Dual question: Who are the tiles in locations {2,3,6,7} and how many moves are needed to distribute them to their goal locations?

  • Regular and dual lookupsRegular lookup: PDB[8,12,13,14]Dual lookup: PDB[9,5,12,15]

  • Regular and dual in TopSpinRegular lookup for C : PDB[1,2,3,7,6]Dual lookup for C: PDB[1,2,3,8,9]

  • Dual lookupsDual lookups are possible when there is a symmetry between locations and objects:Each object is in only one location and each location occupies only one object.Good examples: TopSpin, Rubiks cubeBad example: Towers of HanoiProblematic example: Tile Puzzles

  • Inconsistency of Dual lookups Example: Top-Spin c(b,c)=1Consistency of heuristics: |h(a)-h(b)|
  • Traditional Pathmaxchildren inherit f-value from their parents if it makes them largerg=1h=4f=5g=2h=2f=4g=2h=3f=5InconsistencyPathmax

  • Bidirectional pathmax (BPMX)Bidirectional pathmax: h-values are propagated in both directions decreasing by 1 in each edge.If the IDA* threshold is 2 then with BPMX the right child will not even be generated!!h-values251453h-valuesBPMX

  • Results: (17,4) TopSpin puzzleNodes improvement (17r+17d) : 1451Time improvement (4r+4d) : 72We also solved the (20,4) TopSpin version.

  • Results: Rubiks cubeNodes improvement (24r+24d) : 250Time improvement (4r+4d) : 55 Data on 1000 states with 14 random moves PDB of 7-edges cubies

  • Results: Rubiks cubeWith duals we improved Korfs results on random instances by a factor of 1.5 using exactly the same PDBs.

  • Results: tile puzzles With duals, the time for the 24 puzzle drops from 2 days to 1 day.

  • DiscussionResults for the TopSpin and Rubiks cube are better than those of the tile puzzles

    Dual PDB lookups and BPMX cutoffs are more effective if each operators changes larger part of the states.

    This is because the identity of the objects being queried in consecutive states are dramatically changed

  • SummaryDual PDB lookupsBPMX cutoffs for inconsistent heuristicsState of the art solvers.

  • Future workDuality in search spacesWhich and how many symmetries to useOther sources of inconsistenciesBetter ways for propagating inconsistencies