PBeFS
Parallel Best-First Search
Loading...
Searching...
No Matches
ZobristDistribution< D > Class Template Reference

HDA*[Z]: Zobrist hashing of the features of the state. More...

#include <PBeFS/astar/Distribution.h>

Public Member Functions

 ZobristDistribution (const D &domain, std::uint64_t seed=1)
 constructor, drawing the table of D from the seed
std::uint64_t hash (const state_t< D > &s) const
 the Zobrist hash of s
std::uint32_t key (const state_t< D > &s) const
 the key of s, the high 32 bits of its hash
unsigned owner (const state_t< D > &s, unsigned p) const
 the owner of s among p workers, that of its key
std::uint32_t key (std::uint32_t k, const state_t< D > &s, const state_t< D > &t) const
 the key of t, a successor of s whose key is k

Static Public Member Functions

static std::string name (void)
 the name in the notation of Jinnai and Fukunaga

Detailed Description

template<FeatureDomain D>
class PBeFS_di_unipi_it::ZobristDistribution< D >

HDA*[Z]: Zobrist hashing of the features of the state.

\( Z( s ) = R[ x_0 ] \oplus \cdots \oplus R[ x_n ] \), where \( x_0 , \ldots , x_n \) are the features of \( s \), \( R \) a table of random 64-bit strings and \( \oplus \) the exclusive or of the bits [see Zobrist, 1970, and Kishimoto, Fukunaga and Botea, AIJ 2013]. Zobrist hashing is simple tabulation hashing, which is 3-independent: it spreads the states uniformly over the workers, but nearly every successor lands on another worker than its parent.

Constructor & Destructor Documentation

◆ ZobristDistribution()

template<FeatureDomain D>
ZobristDistribution ( const D & domain,
std::uint64_t seed = 1 )
inlineexplicit

constructor, drawing the table of D from the seed

Member Function Documentation

◆ hash()

template<FeatureDomain D>
std::uint64_t hash ( const state_t< D > & s) const
inlinenodiscard

the Zobrist hash of s

◆ key() [1/2]

template<FeatureDomain D>
std::uint32_t key ( const state_t< D > & s) const
inlinenodiscard

the key of s, the high 32 bits of its hash

◆ key() [2/2]

template<FeatureDomain D>
std::uint32_t key ( std::uint32_t k,
const state_t< D > & s,
const state_t< D > & t ) const
inlinenodiscard

the key of t, a successor of s whose key is k

Equal to key( t ), but it reads the entries of the features that the move changes only [see IncrementalFeatureDomain].

◆ name()

template<FeatureDomain D>
std::string name ( void )
inlinestaticnodiscard

the name in the notation of Jinnai and Fukunaga

◆ owner()

template<FeatureDomain D>
unsigned owner ( const state_t< D > & s,
unsigned p ) const
inlinenodiscard

the owner of s among p workers, that of its key


The documentation for this class was generated from the following file: