External A* - PowerPoint PPT Presentation

About This Presentation
Title:

External A*

Description:

External A* Stefan Edelkamp, Shahid Jabbar (ich) University of Dortmund, Germany and Stefan Schr dl (DaimlerChrysler, CA) – PowerPoint PPT presentation

Number of Views:114
Avg rating:3.0/5.0
Slides: 20
Provided by: shah92
Category:

less

Transcript and Presenter's Notes

Title: External A*


1
External A
  • Stefan Edelkamp, Shahid Jabbar (ich)
  • University of Dortmund, Germany
  • and
  • Stefan Schrödl (DaimlerChrysler, CA)

2
A Algorithm
  • A.k.a Goal-directed dijkstra
  • A heuristic estimate is used to guide the search.
  • E.g. Straight line distance from the current node
    to the goal in case of a graph with a geometric
    layout.
  • Reweighting
  • w(u,v) w(u,v) h(u) h(v)

3
Problems (Its a big big world for a small small
memory)
  • A needs to store all the states during
    exploration.
  • A generates large amount of duplicates that can
    be removed using an internal hash table only if
    it can fit in the main memory.
  • A do not exhibit any locality of expansion. For
    large state spaces, standard virtual memory
    management can result in excessive page faults.

4
A bit of History
  • Munagala and Ranade
  • Generated states flushed to the disk for every
    BFS level.
  • No hash table.
  • Duplicates are removed by sorting the nodes
    according to the indices and doing an scan and
    compaction phase.
  • Before expanding a layer t, the nodes in the
    layer t-1 and t-2 are subtracted from t.
  • O(V sort(V E)) I/Os.

5
A bit of History (contd)
  • Further improved by Mehlhorn Meyer to
  • O(v(V scan(V E)) sort(V E))
    I/Os.
  • Korf presented External BFS for implicit graphs
    with the name Delayed duplicate detection for
    frontier search.
  • Keep a level in the main memory until it exceeds
    a certain bound.
  • If it does, sort it and flush to the disk.
  • When a level is finished, merge the presorted
    buffers to get a sorted file and remove the
    duplicates

6
Restriction on the domain
  • Implicit state space generated on the fly gt no
    adjacency list
  • Unweighted
  • Undirected
  • Consistent Heuristic

7
Take a closer look
Ah ha! Its a Bucket of states
h
  • Implicit, unweighted, undirected graphs
  • Consistent
  • heurisitc
  • estimates.
  • gt ?h -1,0,1

0 1 2 3 4 5 6






0
1
2
3
4
5
g
8
Bucket
  • A Bucket is a set of states, residing on the
    disk, having the same (g, h) value,
  • Where, g number of transitions needed to
    transform the initial state to the states of the
    bucket,
  • and h Estimated distance of the buckets state
    to the goal
  • No state is inserted again in a bucket that is
    expanded
  • If Active (being read or written), represented
    internally by a small buffer.

9
External A
  • Buckets represent temporal locality cache
    efficient order of expansion.
  • If we store the states in the same bucket
    together we can exploit the spatial locality.
  • Munagala and Ranades BFS and Korfs delayed
    duplicate detection for implicit graphs.

External A
10
External A - pseudocode
  • Procedure External A
  • Bucket(0, h(I)) ? I
  • fmin ? h(I)
  • while (fmin ? 8)
  • g ? mini Bucket(i, fmin - i) ? ?
  • while (gmin fmin)
  • h ? fmin - g
  • Bucket(g, h) ? remove duplicates from
    Bucket(g, h)
  • Bucket(g, h) ? Bucket(g, h) \
  • (Bucket(g - 1, h) U Bucket(g - 2, h)) //
    Subtraction
  • A(fmin),A(fmin 1),A(fmin 2) ? N(Bucket(g,
    h)) // Generate Neighbours
  • Bucket(g 1, h 1) ? A(fmin 2)
  • Bucket(g 1, h) ? A(fmin 1) U
    Bucket(g 1, h)
  • Bucket(g 1, h - 1) ? A(fmin) U Bucket(g
    1, h - 1)
  • g ? g 1
  • fmin ? mini j gt fmin Bucket(i, j) ? ? U
    8

11
Complexity Analysis
  • Internal A gt Each edge is looked at most once.
  • Duplicates Removal
  • Sorting the green bucket having one state for
    every edge from the 3 black buckets.
  • Scanning and compaction.
  • O(sort(E))
  • Subtraction
  • Removing states of orange buckets (duplicates
    free) from the green one.
  • O(scan(V) scan(E))




12
I/O Performance of External A
  • Theorem The complexity of External A in an
    implicit unweighted and undirected graph with a
    consistent estimate is bounded by O(sort(E)
    scan(V)) I/Os.

13
15-Puzzle
1 3 2
4 5 6 7
8 15 10 11
12 13 14 9
1 2 3
4 5 6 7
8 9 10 11
12 13 14 15
14
Experimental Results Test Instances
S. No. Instance Init. Estimate Opt. Sol. Length
1 0 2 1 3 5 4 6 7 8 9 10 11 12 13 14 15 4 16
2 0 1 2 3 5 4 7 6 8 9 10 11 12 13 14 15 4 24
3 0 2 1 3 5 4 7 6 8 9 13 11 12 10 14 15 10 30
4 (12) 14 1 9 6 4 8 12 5 7 2 3 0 10 11 13 15 35 45
5 (16) 1 3 2 5 10 9 15 6 8 14 13 11 12 4 7 0 24 42
6 (14) 7 6 8 1 11 5 14 10 3 4 9 13 15 2 0 12 41 59
7 (60) 11 14 13 1 2 3 12 4 15 7 9 5 10 6 8 0 48 66
8 (88) 15 2 12 11 14 13 9 5 1 3 8 7 0 10 6 4 43 65
15
Test Run Generated states
16
Test Run - Duplicates
17
Exp. Results Generated nodes
S.No. IDA External A gain Space (GB)
4 546,344 493,990 9.58 0.003
5 17,984,051 5,180,710 71.2 0.039
6 1,369,596,778 297,583,236 78.3 2.2
7 3,337,690,331 2,269,240,000 32 16.91
8 6,009,130,748 2,956, 384,330 50.8 22
18
Cache-Efficient Behaviour
File on disk
Internal Buffers
CPU
19
Conclusion
  • A for secondary storage with an I/O complexity
    of O(sort(E) scan(V)) .
  • Given that Delayed Duplication Detection has to
    be performed, the bound is I/O optimal.
  • File-based priority queue.
  • Hash table replaced by Delayed Duplicate
    Detection.
  • Successfully implemented to solve Korfs Largest
    instance in secondary memory.
  • In case of non-uniformly weighted graphs with
    small integer weights in 1, , C.
  • O(sort(E) C scan(V))
Write a Comment
User Comments (0)
About PowerShow.com