|
PBeFS
Parallel Best-First Search
|
Header file for the class template SafePBNF, the livelock-free Parallel Best-NBlock-First search of Burns, Lemons, Ruml and Zhou (JAIR 2010). More...
#include <algorithm>#include <atomic>#include <condition_variable>#include <memory>#include <mutex>#include <type_traits>#include <utility>#include <vector>#include "PBeFS/astar/HDAStar.h"#include "ADS/tree/BTreeMap.h"Go to the source code of this file.
Classes | |
| struct | PBNFOptions |
| the options of SafePBNF More... | |
| class | SafePBNF< D, Executor, Open > |
| Safe Parallel Best-NBlock-First search. More... | |
| struct | SafePBNF< D, Executor, Open >::Worker::Kid |
Namespaces | |
| namespace | PBeFS_di_unipi_it |
| namespace for the Parallel Best-First Search library | |
Header file for the class template SafePBNF, the livelock-free Parallel Best-NBlock-First search of Burns, Lemons, Ruml and Zhou (JAIR 2010).
The search follows the pseudocode of appendix A of Burns et al. (JAIR 2010), with the notation of the page "Best-first search and A*" of the documentation. Each nblock \( b \) has its lists \( \mathrm{OPEN}( b ) \) and \( \mathrm{CLOSED}( b ) \), its interference scope \( I( b ) \) (the nblocks that, if in use, keep \( b \) from being free), the counters \( \sigma( b ) \) of the nblocks in use and \( \sigma_h( b ) \) of the hot nblocks whose interference scopes hold \( b \), and the value \( f( b ) \), the least \( f \) of its OPEN list, which its worker publishes after each expansion; one lock protects the nblock graph, i.e., the counters, the hot flags and the free list, which is ordered by \( f( b ) \), and \( m \) is the minimum number of expansions in an nblock before a switch:
The worker of an nblock expands its nodes and inserts their children (line 12) without any lock, since the nblocks of the children lie in the duplicate detection scope of \( b \), which no other worker can hold while \( b \) is in use. The hot nblocks (lines 20 and 46 to 51) prevent the livelock of plain PBNF: an nblock that interferes with a hot one leaves the free list and is released at the next check of its worker, so that every hot nblock eventually becomes free. The search ends at line 32, when no nblock is in use and none is free, the nblocks with no node below the incumbent having left the free list at line 30. The value \( f( b' ) \) read at lines 18 and 28 is the one published by the other workers, which may be slightly out of date; this changes the order of expansion, and not the cost of the path found.