AStar

Declared in astar/AStar.h; the same class on the site of Doxygen.

template<Domain D, class Open = std::conditional_t<std::is_integral_v<cost_t<D>>, BucketOpenList<Node<state_t<D>, cost_t<D>>>, HeapOpenList<Node<state_t<D>, cost_t<D>>>>>
class AStar

sequential A* over a Domain, with the OPEN list Open

This is Algorithm 1 of Fukunaga et al. (2017): the goal test is done when a node is selected for expansion, so that the first goal expanded is optimal if h is admissible. A node reached through a cheaper path is reopened even if it is closed, so that the search stays admissible with an admissible but inconsistent heuristic; with a consistent one no node is ever reopened.

Open defaults to BucketOpenList for integer costs and to HeapOpenList otherwise [see OpenList.h].

Public Types

using State = state_t<D>

the state type

using Cost = cost_t<D>

the cost type

using NodeT = Node<State, Cost>

the node type

using SolutionT = Solution<State, Cost>

the solution type

Public Functions

inline explicit AStar(const D &domain, const SearchOptions &options = {})

constructor, taking the Domain (which must outlive the AStar)

inline SolutionT solve(void) const

searches the Domain, returning the Solution