|
PBeFS
Parallel Best-First Search
|
Header file for the class template AStar, the sequential A* search of Hart, Nilsson and Raphael (1968). More...
#include "PBeFS/astar/Domain.h"#include "PBeFS/astar/Node.h"#include "PBeFS/astar/NodeTable.h"#include "PBeFS/astar/OpenList.h"#include "PBeFS/core/SearchUtils.h"#include "PBeFS/astar/Solution.h"Go to the source code of this file.
Classes | |
| class | AStar< D, Open > |
| sequential A* over a Domain, with the OPEN list Open More... | |
Namespaces | |
| namespace | PBeFS_di_unipi_it |
| namespace for the Parallel Best-First Search library | |
Functions | |
| template<Domain D> | |
| Solution< state_t< D >, cost_t< D > > | astar (const D &domain, OpenKind open=OpenKind::automatic, const SearchOptions &options={}) |
| searches a Domain with A*, choosing the OPEN list at run time | |
Header file for the class template AStar, the sequential A* search of Hart, Nilsson and Raphael (1968).
The search follows Algorithm 1 of Fukunaga et al. (2017), with the notation and the conventions of the page "Best-first search and A*" of the documentation: CLOSED is the table of the generated states, each one with its node and a flag that tells whether the node is closed, i.e., expanded with its current \( g \), and OPEN is a priority queue of entries \( ( f , g , u ) \) ordered by increasing \( f \) and, for equal \( f \), by decreasing \( g \):
Neither OPEN list decreases a key: line 16 pushes a second entry of \( v \), and the first one, which records the old \( g \), is dropped at line 6 when it reaches the top. The goal test at line 8, when a node is selected and not when it is generated, makes the first goal selected an optimal one if \( h \) is admissible, and the reopening at lines 14 to 16 keeps the search optimal when \( h \) is admissible but not consistent; with a consistent \( h \) no closed node is ever reopened. The successors of \( u \) are generated first, with the slots of their lookups in CLOSED prefetched, and looked up afterwards, so that the cache misses of the lookups overlap.