1 / 19

External A*

External A*. Stefan Edelkamp, Shahid Jabbar (ich) University of Dortmund, Germany and Stefan Schrödl (DaimlerChrysler, CA). A* Algorithm. A.k.a Goal-directed dijkstra A heuristic estimate is used to guide the search.

jack-park
Download Presentation

External A*

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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) External A*

  3. Problems (It’s 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. External A*

  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. External A*

  5. A bit of History (contd…) • Further improved by Mehlhorn & Meyer to • O(√(|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 External A*

  6. Restriction on the domain • Implicit state space – generated on the fly –> no adjacency list • Unweighted • Undirected • Consistent Heuristic External A*

  7. Take a closer look Ah ha! It’s a Bucket of states h • Implicit, unweighted, undirected graphs • Consistent heurisitc estimates. => ∆h ={-1,0,1} g External A*

  8. Insert state Flush when full Buffer in internal memory File on disk 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 bucket’s 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. External A*

  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 Ranade’s BFS and Korf’s delayed duplicate detection for implicit graphs. External A* External A*

  10. External A* - pseudocode Procedure External A* Bucket(0, h(I))  {I} fminh(I) while (fmin ≠ ∞) g min{i | 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 min{i + j > fmin | Bucket(i, j) ≠ } U {∞} External A*

  11. Complexity Analysis • Internal A* => 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|)) External A*

  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. External A*

  13. 15-Puzzle External A*

  14. Experimental Results – Test Instances External A*

  15. Test Run – Generated states External A*

  16. Test Run - Duplicates External A*

  17. Exp. Results – Generated nodes External A*

  18. Cache-Efficient Behaviour: File on disk Internal Buffers CPU External A*

  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 Korf’s 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|)) External A*

More Related