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

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

9.3 Equations as Relations CORD Math Mrs. Spitz Fall 2006.
& dding ubtracting ractions.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 38.
By D. Fisher Geometric Transformations. Reflection, Rotation, or Translation 1.
and 6.855J Cycle Canceling Algorithm. 2 A minimum cost flow problem , $4 20, $1 20, $2 25, $2 25, $5 20, $6 30, $
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
0 - 0.
ALGEBRAIC EXPRESSIONS
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
MULTIPLYING MONOMIALS TIMES POLYNOMIALS (DISTRIBUTIVE PROPERTY)
ADDING INTEGERS 1. POS. + POS. = POS. 2. NEG. + NEG. = NEG. 3. POS. + NEG. OR NEG. + POS. SUBTRACT TAKE SIGN OF BIGGER ABSOLUTE VALUE.
MULTIPLICATION EQUATIONS 1. SOLVE FOR X 3. WHAT EVER YOU DO TO ONE SIDE YOU HAVE TO DO TO THE OTHER 2. DIVIDE BY THE NUMBER IN FRONT OF THE VARIABLE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
FACTORING Think Distributive property backwards Work down, Show all steps ax + ay = a(x + y)
Addition Facts
BALANCING 2 AIM: To solve equations with variables on both sides.
Solve Multi-step Equations
Heuristic Search Russell and Norvig: Chapter 4 Slides adapted from:
Chapter 4: Informed Heuristic Search
Informed Search CS 171/271 (Chapter 4)
Informed search algorithms
Discrete Math Recurrence Relations 1.
Review: Search problem formulation
Heuristic Search. Best First Search A* Heuristic Search Heuristic search exploits additional knowledge about the problem that helps direct search to.
1 Column Generation. 2 Outline trim loss problem different formulations column generation the trim loss problem master problem and subproblem in column.
1 Undirected Breadth First Search F A BCG DE H 2 F A BCG DE H Queue: A get Undiscovered Fringe Finished Active 0 distance from A visit(A)
© S Haughton more than 3?
1 Breadth First Search s s Undiscovered Discovered Finished Queue: s Top of queue 2 1 Shortest path from s.
1 Directed Depth First Search Adjacency Lists A: F G B: A H C: A D D: C F E: C D G F: E: G: : H: B: I: H: F A B C G D E H I.
Lecture 4: Informed/Heuristic Search
Informed Search Problems
Squares and Square Root WALK. Solve each problem REVIEW:
Past Tense Probe. Past Tense Probe Past Tense Probe – Practice 1.
An Introduction to Artificial Intelligence
Artificial Intelligence
Addition 1’s to 20.
25 seconds left…...
Warm Ups {(2,0) (-1,3) (2,4)} Write as table Write as graph
Test B, 100 Subtraction Facts
The A* Algorithm Héctor Muñoz-Avila. The Search Problem Starting from a node n find the shortest path to a goal node g ?
Week 1.
We will resume in: 25 Minutes.
Dantzig-Wolfe Decomposition
PSSA Preparation.
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.5) Sept, 14, 2012.
HEURISTIC SEARCH Ivan Bratko Faculty of Computer and Information Sc. University of Ljubljana.
Inconsistent Heuristics
Finding Search Heuristics Henry Kautz. if State[node] is not in closed OR g[node] < g[LookUp(State[node],closed)] then A* Graph Search for Any Admissible.
Recent Progress in the Design and Analysis of Admissible Heuristic Functions Richard E. Korf Computer Science Department University of California, Los.
Problem Solving Agents A problem solving agent is one which decides what actions and states to consider in completing a goal Examples: Finding the shortest.
Solving Problems by Searching Currently at Chapter 3 in the book Will finish today/Monday, Chapter 4 next.
Additive pattern database heuristics
1 Advances in Pattern Databases Ariel Felner, Ben-Gurion University Israel
2 Heuristic from Relaxed Models  A heuristic function returns the exact cost of reaching a goal in a simplified or relaxed version of the original problem.
Research Related to Real-Time Strategy Games Robert Holte November 8, 2002.
Origin of Heuristic Functions
Compressing a Single PDB Presented by: Danielle Sauer CMPUT 652 Project December 1, 2004.
Pattern Databases Robert Holte University of Alberta November 6, 2002.
Dovetail Killer? Implementing Jonathan’s New Idea Tarek Sherif.
Heuristics CSE 473 University of Washington. © Daniel S. Weld Topics Agency Problem Spaces SearchKnowledge Representation Planning PerceptionNLPMulti-agentRobotics.
Using Abstraction to Speed Up Search Robert Holte University of Ottawa.
Li Wang Haorui Wu University of South Carolina 04/02/2015 A* with Pattern Databases.
Finding Heuristics Using Abstraction
Heuristics Local Search
Heuristics Local Search
Presentation transcript:

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

2 Overview Heuristic search and A* Test domains Pattern databases Dual lookups in pattern databases Experimental results

3 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

4 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.

5 Domains 15 puzzle 10^13 states First solved by [Korf 85] with IDA* and Manhattan distance Takes 53 seconds 24 puzzle 10^24 states First solved by [Korf 96] Takes 2 days

6 Rubiks cube 10^19 states First solved by [Korf 97] Takes 2 days to solve Domains

7 (n,k) Top Spin Puzzle n tokens arranged in a ring States: any possible permutation of the tokens Operators: Any k consecutive tokens can be reversed The (17,4) version has 10^13 states The (20,4) version has 10^18 states

8 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.

9 Subproblems-Abstractions Many 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.

10 Pattern Databases heuristics A 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]. Pattern space Search space Mapping/Projection

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

12 Disjoint Additive PDBs (DADB) Values of disjoint databases can be added and are still admissible [Korf & Felner: AIJ-02, Felner, Korf & Hanan: JAIR-04] 7-8 If you have many PDBS, take their maximum

13 DADB:Tile puzzles MemoryTimeNodesValueHeuristicPuzzle 3-tera-bytes28 days10^13Breadth-FS ,189, Manhattan15 3, ,090, , , , , ,0002 days360,892,479, [Korf, AAAI 2005]

14 Symmetries in PDBs Symmetric 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 cube We can take the maximum among the different lookups These are all geometrical symmetries We suggest a new type of symmetry!!

15 Regular and dual representation Regular representation of a problem: Variables – objects (tiles, cubies etc,) Values – locations Dual representation: Variables – locations Values – objects

16 Regular vs. Dual lookups in PDBs Regular 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?

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

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

19 Dual lookups Dual 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 cube Bad example: Towers of Hanoi Problematic example: Tile Puzzles

20 Inconsistency of Dual lookups Example: Top-Spin c(b,c)=1 Consistency of heuristics: |h(a)-h(b)| <= c(a,b) RegularDual b00 c12 Both lookups for B PDB[1,2,3,4,5]=0 Regular lookup for C PDB[1,2,3,7,6]=1 Dual lookup for C PDB[1,2,3,8,9]=2

21 Traditional Pathmax children inherit f-value from their parents if it makes them larger g=1 h=4 f=5 g=2 h=2 f=4 g=2 h=3 f=5 Inconsistency Pathmax

22 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-values BPMX

23 Results: (17,4) TopSpin puzzle regulardualBPMXnodestime ,019, no7,618, yes1,397, yes82, yes27, Nodes improvement (17r+17d) : 1451 Time improvement (4r+4d) : 72 We also solved the (20,4) TopSpin version.

24 Results: Rubiks cube regulardualBPMXnodestime ,930, no19,653, yes8,315, yes615, yes362, Nodes improvement (24r+24d) : 250 Time improvement (4r+4d) : 55 Data on 1000 states with 14 random moves PDB of 7-edges cubies

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

26 Results: tile puzzles HeuristicBPMXValuenodestime Manhattan ,189, R , R+R* , R+R*+D+D*yes , With duals, the time for the 24 puzzle drops from 2 days to 1 day.

27 Discussion Results 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

28 Summary Dual PDB lookups BPMX cutoffs for inconsistent heuristics State of the art solvers.

29 Future work Duality in search spaces Which and how many symmetries to use Other sources of inconsistencies Better ways for propagating inconsistencies