Upload
karin-rose
View
212
Download
0
Embed Size (px)
Citation preview
Dynamic State-Space Partitioning in External-Memory Graph Search
Rong Zhou† and Eric A. Hansen‡
†Palo Alto Research Center‡Mississippi State University
External-memory graph search
Internal memory vs. External memory
1 ~ 4 GB 160 GB ~ 1.5 TB External memory is cheap and almost inexhaustible But random access of external memory (e.g., for
duplicate detection) is 105 ~ 106 times slower than internal memory
Previous work
Hash-based delayed duplicate detection [Korf & Schultze AAAI-05; Korf JACM-08]
Structured duplicate detection [Zhou & Hansen AAAI-04, 06]
Both use state-space abstraction to … partition nodes into buckets or disk files leverage graph local structure to save RAM
or disk space
Structured duplicate detection [Zhou & Hansen AAAI-04]
Localizes memory references in duplicate detection by exploiting graph structure revealed by a state-space projection function
Example of projection function
…
0 1 15blank pos. =
??? ??
?
??
? ? ?? ? ? ?
??? ???
??
? ? ?? ? ? ?
??? ??
?
??
? ? ?? ? ?
?
…
Abstract state-space graph
Created by state-space projection function
ExampleB0 B3B1 B2
B8
B4 B5 B6 B7
16 abstract states> 10 trillion states
31
4 65
2
8
7
9 10 11
12 13 14 15
B9 B10 B11
B12 B13 B14 B15
Duplicate-detection scope
A set of blocks (of stored nodes) that is guaranteed to contain all stored successor nodes of the currently-expanding node
B1B0 B4
B0 B3B1 B2
B8
B4 B5 B6 B7
B9 B10 B11
B12 B13 B14 B15
B0 B1
B4
B3B2
B8
B5 B6 B7
B9 B10 B11
B12 B13 B14 B15
B2 B3 B5
B6 B7 B8
B15B14…
Edge Partitioning
Reduces duplicate-detection scope to one block of stored nodes – Guaranteed!
B1
B0 B3B1 B2
B8
B4 B5 B6 B7
B9 B10 B11
B12 B13 B14 B15
B1B0 B3B2
B8
B5 B6 B7
B9 B10 B11
B12 B13 B14 B15
B4
B2 B3 B5
B6 B7 B8
B15B14
B0 B4
…
B3B2
B8
B5 B6 B7
B9 B10 B11
B12 B13 B14 B15
B4
B1B0
B4
B1
B4
What is a good abstraction?
Capture local structure DDD: Interleaving expansion and merging SDD: Fewer incremental expansions
Distribute nodes evenly into buckets Make sure largest bucket fits in RAM Not too many buckets
Achieving both is challenging, especially for static abstraction
A pathological example
Degenerative state-space projection function 3
1
4 65
2
8 7
9 10 11
12 13 14 15
31
4 65
2
8
7
9 10 11
12 13 14 15
3
1
4 65
2
8 7
9 10 11
12 13 14 15
31
4 65
2
8
7
9 10 11
12 13 14 15
In theory, there are 518,918,400 buckets.
Start Goal
But most (> 99.99%) of them are empty!
Greedy abstraction algorithm
Starts with a “blank” abstraction Mark all state variables as unselected While ( size of abstract graph M )
Find an unselected variable Vi s.t. adding it to current abstraction minimizes largest bucket size
Add Vi into set of abstraction variables Mark Vi as selected Update current abstraction
Move nodes to their new buckets
Example
Node X Y Z
a 1 4 6
b 1 5 6
c 2 4 6
d 2 5 6
e 3 4 7
f 3 5 7
Vars Values States
{X}
{X = 1} {a, b}
{X = 2} {c, d}
{X = 3} {e, f}
{Y}{Y = 4} {a, c, e}
{Y = 5} {b, d, f}
{Z}{Z = 6}
{a, b, c, d}
{Z = 7} {e, f}
Vars Values States
{X,Y}{X = 1, Y =
4} {a}
{X = 1, Y =
5} {b}
{X = 2, Y =
4} {c}
{X = 2, Y =
5} {d}
{X = 3, Y =
4} {e}
{X = 3, Y =
5} {f}
{X,Z}{X = 1, Z =
6} {a,b}
{X = 1, Z =
7}
{X = 2, Z =
6} {c, d}
{X = 2, Z =
7}
{X = 3, Z =
6}
{X = 3, Z =
7} {e, f}
Nodes 1st Iteration 2nd Iteration
Computational results Planning results on 15 Puzzle
First planner to optimally solve all 100 of Korf’s 15 Puzzle instances (93 for previous best solver)
<20 MB of RAM for the hardest instance #88 (static partitioning needs >5x RAM for #88)
Uses only Manhattan-Distance heuristic STRIPS planning (6 domains from IPC)
Peak RAM reduced by up to ~19x Better time-space tradeoff Improves with accuracy of heuristic
function
Bucket size histogram for instance #88
Conclusion and future work
Not all abstractions are created equal – even for the ones with the same resolution! Largest bucket depends on starting state Static abstraction ineffective for heuristic
search Future work
Sampling approach Parallel search