Searching for Macro-operators with Automatically Generated Heuristics
-
Upload
isabella-allison -
Category
Documents
-
view
32 -
download
0
description
Transcript of Searching for Macro-operators with Automatically Generated Heuristics
![Page 1: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/1.jpg)
Searching for Macro-operators with Automatically Generated Heuristics
István T. Hernádvölgyi
University of Ottawa
![Page 2: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/2.jpg)
Motivation
Time
Quality
1 sec
1 week
18 85
Korf 97
Korf 85
50 455
Sims 70, Osterlund 95us
![Page 3: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/3.jpg)
Subgoals and Macros
1 2 3 4 5
o1
o2
o3
o4
![Page 4: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/4.jpg)
1 2 3 4 5
![Page 5: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/5.jpg)
1
2
3
4
1
1
1
2
2 3
1 2 3 4 5
![Page 6: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/6.jpg)
1
1
1
1
1
2
2
2
2
3
3
3
4
4
1
1
1
1
1
1
1
1
1
2
2
2
2
2
3
3
1 2 3 4 5
![Page 7: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/7.jpg)
1
1
1
1
1
2
2
2
2
3
3
3
4
4
1
1
1
1
1
1
1
1
1
2
2
2
2
2
3
3
{}
{o1}
{o2}
{o3}
{o4}
{}
{o2,o1,o2}
{o3,o2,o3}
{o4,o3,o4}
{o3,o1,o3}
{}
{o4,o2,o4}
{}
{o4,o1,o4}
1 2 3 4 5
![Page 8: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/8.jpg)
1
1
1
1
1
2
2
2
2
3
3
3
4
4
1
1
1
1
1
1
1
1
1
2
2
2
2
2
3
3
{}
{o1}
{o2}
{o3}
{o4}
{}
{o2,o1,o2}
{o3,o2,o3}
{o4,o3,o4}
{o3,o1,o3}
{}
{o4,o2,o4}
{}
{o4,o1,o4}
4 1 2 5 3
![Page 9: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/9.jpg)
1
1
1
1
1
2
2
2
2
3
3
3
4
4
1
1
1
1
1
1
1
1
1
2
2
2
2
2
3
3
{}
{o1}
{o2}
{o3}
{o4}
{}
{o2,o1,o2}
{o3,o2,o3}
{o4,o3,o4}
{o3,o1,o3}
{}
{o4,o2,o4}
{}
{o4,o1,o4}
4 1 2 5 3
{o1}
![Page 10: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/10.jpg)
1
1
1
1
1
2
2
2
2
3
3
3
4
4
1
1
1
1
1
1
1
1
1
2
2
2
2
2
3
3
{}
{o1}
{o2}
{o3}
{o4}
{}
{o2,o1,o2}
{o3,o2,o3}
{o4,o3,o4}
{o3,o1,o3}
{}
{o4,o2,o4}
{}
{o4,o1,o4}
1 4 2 5 3
{o1,o2,o1,o2}
![Page 11: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/11.jpg)
1
1
1
1
1
2
2
2
2
3
3
3
4
4
1
1
1
1
1
1
1
1
1
2
2
2
2
2
3
3
{}
{o1}
{o2}
{o3}
{o4}
{}
{o2,o1,o2}
{o3,o2,o3}
{o4,o3,o4}
{o3,o1,o3}
{}
{o4,o2,o4}
{}
{o4,o1,o4}
1 2 4 5 3
{o1,o2,o1,o2,o4,o2,o4}
![Page 12: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/12.jpg)
1
1
1
1
1
2
2
2
2
3
3
3
4
4
1
1
1
1
1
1
1
1
1
2
2
2
2
2
3
3
{}
{o1}
{o2}
{o3}
{o4}
{}
{o2,o1,o2}
{o3,o2,o3}
{o4,o3,o4}
{o3,o1,o3}
{}
{o4,o2,o4}
{}
{o4,o1,o4}
1 2 3 5 4
{o1,o2,o1,o2,o4,o2,o4,o4,o1,o4} {o1,o2,o1,o2,o4,o2,o1,o4} {o2,o4,o3,o2}
![Page 13: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/13.jpg)
2
2
2
2
3
3
3
1
1
1
1
1
1
1
2
2
2
{}
{o2,o1,o2}
{o3,o2,o3}
{o4,o3,o4}
{o3,o1,o3}
{}
{o4,o2,o4}
![Page 14: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/14.jpg)
2 31 {}
2 31
2 31
231
2 31
2 31
231
231
2 31
231
231
231
{o3,o1,o3}
{o4,o2,o4}
{o1,o2,o1}
{o1,o3,o2}
{o1,o4,o1,o3}
{o2,o3,o1}
{o3,o2,o3}
{o2,o4,o2}
{o3,o4,o1}
{o2,o3,o4,o2,o3}
{o4,o3,o4}
![Page 15: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/15.jpg)
![Page 16: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/16.jpg)
Results
![Page 17: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/17.jpg)
The cost of merging subgoals
#macros avg/max length
States expanded to build table
Time to solve 10,000 problems
18 subgoals 258 5.6 / 13 108 million
(1 hour)
6 subgoals
(8,3,2,2,1)
2902
+ 96 million
9.7 / 13 ?
![Page 18: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/18.jpg)
Solution: use heuristics to speed up search for each macro
• For each subgoal, create a heuristic specifically for that subgoal
• Can combine this with the heuristic for the previous subgoal (because that subgoal is a subset of the current subgoal)
• Need to create these automatically, they are unintuitive spaces and the heuristics are “throw away”
![Page 19: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/19.jpg)
Previous WorkAutomatically Generated Heuristics• Absolver [Prieditis90]• Pattern Database [CulbersonSchaeffer96]
– 15 Puzzle, “don’t care tiles”, Rubik’s Cube [Korf97]
– Domain Abstraction [HolteHernadvolgyi99]
– Planning (Strips) [Edelkamp2000]
h s H s( ) [ ' ]
: , | | | |D D D D1 2 1 2
![Page 20: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/20.jpg)
Pattern Database
1 2 3
4 5 6
7 8
1 2 3
6
181,440 15,120
![Page 21: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/21.jpg)
Pattern Database
6 3 4
8 7 5
12
6 3
12
![Page 22: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/22.jpg)
Domain Abstraction
1 2 3
4 5 6
7 8
181,440 5,040
![Page 23: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/23.jpg)
Rubik’s Cube
ULF UF URF
LF RF
DLF DF DRF
F
DL DR
DLB DB DRB
D
ULB UB URB
UL URU
ULB UL
LB
DLB DL
L
UR URB
RB
DR DRB
R
UB ULB
LB
DB DLB
B
![Page 24: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/24.jpg)
State Representation
URFURF
URBURB
ULBULB
ULFULF
DRFDRF
DRBDRB
DLBDLB
DLFDLF
UFUF
ULUL
URUR
UBUB
LFLF
LBLB
DLDL
RFRF
RBRB
DFDF
DBDB
DRDR
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
DRFURF
ULBURB
ULFULB
DLBULF
DLFDRF
DRFDRB
URBDLB
DRBDLF
DLUF
URUL
RBUR
LBUB
LBLF
LFLB
UFDL
DRRF
ULRB
DFDF
DBDB
RFDR
2 0 1 0 1 0 2 0
0 1 0 0 0 0 1 1 0 0 0 1
Goal state (subscripts indicate orientation)
Typical start state
![Page 25: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/25.jpg)
Macro Search Space
URFURF
URBURB
ULBULB
ULFULF DRF DRB DLB DLF
UFUF
ULUL
URUR
UBUB
LFLF
LBLB
DLDL
RF RBDF DB DR
0 0 0 0
0 0 0 0 0 0 0 0 0
* * * *
* * *R F R B
URFURF
URBURB
ULBULB
ULFULF DRF DRB DLB DLF
UFUF
ULUL
URUR
UBUB
LFLF
LBLB
DLDL
RBDF DB
RFDR
0 0 0 0
0 0 0 0 0 0 0 1 0
* * * *
* * *R F R B
Goal state for the subgoal “fix RF and RB”
Typical start state for this subgoal
![Page 26: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/26.jpg)
Domain Abstraction
• “don’t care” about a cubie’s orientation
• Make 2 (or more) cubies indistinguishable from each other
• Continue to add abstractions until the abstract space is sufficiently small (2 million entries)
![Page 27: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/27.jpg)
Abstraction Example
AURF
AURB
BULB
BULF DRF DRB DLB DLF
CUF
CUL
CUR
CUB
DLF
DLB
DDL
RF RBDF DB DR
x x
x x x x x x x
0 0
0 0
* * * *
* * *R F R B
AURF
AURB
BULB
BULF DRF DRB DLB DLF
CUF
CUL
CUR
CUB
DLF
DLB
DDL
RBDF DB
RFDR
x x
x x x x x x x
0 0
1 0
* * * *
* * *R F R B
Abstracted goal state (x = orientation doesn’t matter)
Abstracted start state (typical)
![Page 28: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/28.jpg)
The cost of merging subgoals
#macros avg/max length
States expanded to build table
18 subgoals 258 5.6 / 13 108 million
(1 hour)
6 subgoals
(8,3,2,2,1)
2902
+ 96 million
9.7 / 13 2 billion + 250,000/problem
(27 hours + 1 second/problem)
![Page 29: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/29.jpg)
Contributions
• Automatically Generated Heuristics for Finding Macro-operators
• Merging Subgoals to Obtain Shorter Solutions
• 44% Improvement for Rubik’s Cube
• Method is General and Mostly Automatic
![Page 30: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/30.jpg)
Using Symmetries
![Page 31: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/31.jpg)
Using SymmetriesURF, URB,ULB,ULF,UF,UL,UR,UB
LF,LB,DL
RF,RB
DF,DB (> DR)
DRF,DRB
DLF (>DLB)
LF,RF,DR RF,RB,DR LB,RB,DL
DLF, DLB
DRF (> DRB)
LF,RB LF,LBLF, RF
![Page 32: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/32.jpg)
Kociemba’s Two-phase Algorithm
U D R L F B, , , , ,2 2 2 2
x y z x C y E z UDo o, , , , C
E
UD
o
o
: ,
: ,
:
C o rn e r O rien ta tio n s 3
E d g e O rien ta tio n s
U D slice d g es
7
2 1 8 7
2 2 0 4 8
1 2
44 9 5
11
x y x x C y E z EUD face UD slice, , , ,
h h x y h x z h y zm ax ( * ( , ) , * ( , ) , * ( , ))
![Page 33: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/33.jpg)
Open Questions
• Do the improvements carry over to other spaces?
• Does the order of the subgoals matter?
![Page 34: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/34.jpg)
![Page 35: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/35.jpg)
![Page 36: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/36.jpg)
![Page 37: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/37.jpg)
![Page 38: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/38.jpg)
![Page 39: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/39.jpg)
![Page 40: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/40.jpg)
![Page 41: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/41.jpg)
![Page 42: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/42.jpg)
![Page 43: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/43.jpg)
![Page 44: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/44.jpg)
Motivation
4 3 1 01 9.
4 3 2 5 2 0 0 3 2 7 4 4 8 9 8 5 6 0 0 0, , , , , ,
![Page 45: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/45.jpg)
Motivation
Time
Quality
1 sec
1 week
18 85
Korf 97
Korf 85Kociemba 92
50
Kloosterman 90 Thistlethwaite 80
455
Sims 70, Osterlund 95
human
![Page 46: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/46.jpg)
Merging Consecutive Subgoals
, ( , , . . . , ) ( ) , ( , ) , . . . , ( , , . . . , )f 1 2 1 1 2 1 2 1 2k k kf f f
f ( , , . . . , ) ( , , . . . , ) , . . . , ( , , . . . , ) , 1 2 1 1 2 1k i l j j kg g l k
g f f fi i j i i i i i j i i j( , , . . . , ) ( ) ( , ) .. . ( , , . . . , ) 1 1 1 1
g mi i j i i j( , , . . . , ) ( , , . . . , ) 1 1
Serial Decomposability [Korf83]
Idea:
![Page 47: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/47.jpg)
![Page 48: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/48.jpg)
![Page 49: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/49.jpg)
![Page 50: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/50.jpg)
Previous WorkMacro-Operators
• Stabilizer Chain [Sims70, Osterlund95]
• Bi-directional Partial-Match [Korf85]
S tab G G GG k k( , , . . . , ) . . ., , ,..., 1 2 1 1 2 1 2
1
![Page 51: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/51.jpg)
Domain Abstraction1. select two invariant cubies: c1 and c22. toss coin3. if (heads) // mask orientations4. if (both orientations masked)5. goto 16. mask orientations of c1 and c27. else // mask cubie identity8. if (mask(c1) == mask(c2) goto 19. select new mask A10. if (!masked(c1) && !masked(c2))11. c1 := A, c2 := A12. else if (masked(c1) && !masked(c2))13. all cubies with mask(c1) and c2 := A14. else if (!masked(c1) && masked(c2))15. all cubies with mask(c2) and c1 := A16. else // both has a mask17. cubies with mask(c1) and mask(c2) := A18. H := expand(N)19. if (H == 0) goto 120. return H
![Page 52: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/52.jpg)
Search
• IDA* [Korf85]
• Maximum of 3 pattern databases (5M entries)
• 18 subgoals
• 6 subgoals
• 10,000 random instances
URF URB ULB ULF UF UL UR UB
LF LB DL RF RB DF DB DR
DRF DRB DLF DLB
, , , , , , , ,
, , , , , , , ( ) ,
, , , ( )
{ , , , , , , , } ,
{ , , } ,{ , } ,{ , , ( )} ,
{ , } ,{ , ( )}
URF URB ULB ULF UF UL UR UB
LF LB DL RF RB DF DB DR
DRF DRB DLF DLB
![Page 53: Searching for Macro-operators with Automatically Generated Heuristics](https://reader035.fdocuments.us/reader035/viewer/2022062308/56812af8550346895d8edf65/html5/thumbnails/53.jpg)
Statistics