PBeFS
Parallel Best-First Search
Loading...
Searching...
No Matches
PBeFS_di_unipi_it::Domain Concept Reference

a search domain More...

#include <PBeFS/astar/Domain.h>

Concept definition

template<class D>
concept PBeFS_di_unipi_it::Domain = requires( const D & d , const typename D::state_type & s ,
typename D::cost_type h ) {
typename D::state_type;
typename D::cost_type;
requires std::is_arithmetic_v< typename D::cost_type >;
requires std::equality_comparable< typename D::state_type >;
requires std::copyable< typename D::state_type >;
{ d.initial_state() } -> std::convertible_to< typename D::state_type >;
{ d.is_goal( s ) } -> std::convertible_to< bool >;
{ d.heuristic( s ) } -> std::convertible_to< typename D::cost_type >;
{ d.hash( s ) } -> std::convertible_to< std::uint64_t >;
d.for_each_successor( s , h ,
detail::successor_sink< typename D::state_type ,
typename D::cost_type >{} );
}
a search domain
Definition Domain.h:103

Detailed Description

a search domain

A type D is a Domain if it provides:

  • the type state_type, a regular value type compared with ==;
  • the type cost_type, an arithmetic type for g, h and the edge costs;
  • initial_state(), the root of the search;
  • is_goal( s ), the goal predicate;
  • heuristic( s ), the estimate h( s ) of the cost from s to a goal;
  • hash( s ), a well spread 64-bit hash of s, used by the closed list;
  • for_each_successor( s , h_s , f ), which calls f( t , c , h_t ) for every successor t of s, c being the cost of the edge ( s , t ) and h_t = h( t ); the value h_s = h( s ) is passed in so that h_t can be computed incrementally.