Xiangiqgame
AI engine for Xiangqi
|
Container for one or more boardstate::ZobristCalculator objects. More...
#include <zobrist.hpp>
Public Member Functions | |
ZobristComponent (const ZobristCalculator< KeyType > primary_calculator, const std::array< ZobristCalculator< KeyType >, NumConfKeys > &confirmation_calculators) | |
Constructs ZobristComponent from existing ZobristCalculator objects. | |
ZobristComponent (uint32_t prng_seed=std::random_device{}()) | |
Constructs ZobristComponent using 32-bit unsigned in as a PRNG seed. | |
KeyType | primary_board_state () |
std::array< KeyType, NumConfKeys > | confirmation_board_states () |
KeyType | primary_calculator_seed () |
std::array< uint32_t, NumConfKeys > | confirmation_calculator_seeds () const |
std::string | primary_board_state_hex_str () const |
uint32_t | prng_seed () |
void | UpdateBoardStates (const ExecutedMove &executed_move) |
void | FullBoardStateCalc (const BoardMap_t &board_map) |
Private Member Functions | |
ZobristComponent (std::mt19937 prng) | |
Constructs ZobristComponent from a std::mt19937 pseudorandom number generator. | |
std::array< KeyType, NumConfKeys > | confirmation_board_states_internal () |
std::array< uint32_t, NumConfKeys > | confirmation_calculator_seeds_internal () const |
void | UpdateBoardStatesInternal (const ExecutedMove &executed_move) |
void | FullBoardStateCalcInternal (const BoardMap_t &board_map) |
Private Attributes | |
ZobristCalculator< KeyType > | primary_calculator_ |
std::array< ZobristCalculator< KeyType >, NumConfKeys > | confirmation_calculators_ |
std::optional< uint32_t > | prng_seed_ |
Container for one or more boardstate::ZobristCalculator objects.
Using more than one boardstate::ZobristCalculator (i.e. NumConfKeys > 0) allows hash collisions to be detected.
Definition at line 142 of file zobrist.hpp.
|
inlineexplicit |
Constructs ZobristComponent from existing ZobristCalculator objects.
Definition at line 150 of file zobrist.hpp.
|
inlineexplicit |
Constructs ZobristComponent using 32-bit unsigned in as a PRNG seed.
Definition at line 158 of file zobrist.hpp.
|
inlineexplicitprivate |
Constructs ZobristComponent from a std::mt19937 pseudorandom number generator.
Used as a helper to public constructor (via delegation).
Definition at line 189 of file zobrist.hpp.
|
inline |
Definition at line 165 of file zobrist.hpp.
|
inlineprivate |
Definition at line 198 of file zobrist.hpp.
|
inline |
Definition at line 169 of file zobrist.hpp.
|
inlineprivate |
Definition at line 206 of file zobrist.hpp.
|
inline |
Definition at line 182 of file zobrist.hpp.
|
inlineprivate |
Definition at line 221 of file zobrist.hpp.
|
inline |
Definition at line 164 of file zobrist.hpp.
|
inline |
Definition at line 172 of file zobrist.hpp.
|
inline |
Definition at line 168 of file zobrist.hpp.
|
inline |
Definition at line 175 of file zobrist.hpp.
|
inline |
Definition at line 178 of file zobrist.hpp.
|
inlineprivate |
Definition at line 214 of file zobrist.hpp.
|
private |
Definition at line 145 of file zobrist.hpp.
|
private |
Definition at line 144 of file zobrist.hpp.
|
private |
Definition at line 146 of file zobrist.hpp.