Xiangiqgame
AI engine for Xiangqi
Loading...
Searching...
No Matches
boardstate::ZobristCoordinator< KeyType, NumConfKeys > Class Template Reference

Implements the BoardStateCoordinator interface, providing a moveselection::MinimaxMoveEvaluator with "reasonably unique" hash values for each encountered board state, and the ability to read/write board_state-MinimaxResult pairs in a boardstate::TranspositionTable. More...

#include <zobrist.hpp>

Inheritance diagram for boardstate::ZobristCoordinator< KeyType, NumConfKeys >:
Inheritance graph
Collaboration diagram for boardstate::ZobristCoordinator< KeyType, NumConfKeys >:
Collaboration graph

Public Member Functions

 ZobristCoordinator (const ZobristCoordinator &)=delete
 
ZobristCoordinatoroperator= (const ZobristCoordinator &)=delete
 
 ZobristCoordinator (ZobristComponent< KeyType, NumConfKeys > zobrist_component)
 
 ZobristCoordinator (uint32_t primary_seed, std::array< uint32_t, NumConfKeys > confirmation_seeds)
 
 ZobristCoordinator (uint32_t prng_seed=(uint32_t) std::random_device{}())
 
KeyType ImplementGetState ()
 
void ImplementUpdateBoardState (const ExecutedMove &executed_move)
 
void ImplementFullBoardStateCalc (const BoardMap_t &board_map)
 
void ImplementRecordTrData (DepthType search_depth, moveselection::MinimaxResultType result_type, moveselection::EqualScoreMoves &similar_moves, MoveCountType access_index)
 
moveselection::TranspositionTableSearchResult ImplementGetTrData (DepthType search_depth, MoveCountType access_index)
 
size_t ImplementGetTrTableSize ()
 
void ImplementUpdateMoveCounter ()
 
const std::string board_state_hex_str ()
 
uint32_t zkeys_seed ()
 
- Public Member Functions inherited from BoardStateCoordinator< ZobristCoordinator< KeyType, NumConfKeys >, KeyType >
void FullBoardStateCalc (const BoardMap_t &board_map)
 
void UpdateBoardState (const ExecutedMove &move)
 
ZobristKey_t GetState ()
 
void RecordTrData (DepthType search_depth, moveselection::MinimaxResultType result_type, moveselection::EqualScoreMoves &similar_moves, MoveCountType access_index)
 
moveselection::TranspositionTableSearchResult GetTrData (DepthType search_depth, MoveCountType access_index)
 
size_t GetTrTableSize ()
 
void UpdateMoveCounter ()
 

Private Attributes

ZobristComponent< KeyType, NumConfKeys > zobrist_component_
 
TranspositionTable< KeyType, NumConfKeys > tr_table_
 
TranspositionTableGuard tr_table_guard_
 
TranspositionTablePruner< KeyType, NumConfKeys > tr_table_pruner_
 

Additional Inherited Members

- Public Types inherited from BoardStateCoordinator< ZobristCoordinator< KeyType, NumConfKeys >, KeyType >
typedef KeyType ZobristKey_t
 

Detailed Description

template<typename KeyType, size_t NumConfKeys>
class boardstate::ZobristCoordinator< KeyType, NumConfKeys >

Implements the BoardStateCoordinator interface, providing a moveselection::MinimaxMoveEvaluator with "reasonably unique" hash values for each encountered board state, and the ability to read/write board_state-MinimaxResult pairs in a boardstate::TranspositionTable.

Definition at line 415 of file zobrist.hpp.

Constructor & Destructor Documentation

◆ ZobristCoordinator() [1/4]

template<typename KeyType , size_t NumConfKeys>
boardstate::ZobristCoordinator< KeyType, NumConfKeys >::ZobristCoordinator ( const ZobristCoordinator< KeyType, NumConfKeys > &  )
delete

◆ ZobristCoordinator() [2/4]

template<typename KeyType , size_t NumConfKeys>
boardstate::ZobristCoordinator< KeyType, NumConfKeys >::ZobristCoordinator ( ZobristComponent< KeyType, NumConfKeys >  zobrist_component)
inlineexplicit

Definition at line 426 of file zobrist.hpp.

◆ ZobristCoordinator() [3/4]

template<typename KeyType , size_t NumConfKeys>
boardstate::ZobristCoordinator< KeyType, NumConfKeys >::ZobristCoordinator ( uint32_t  primary_seed,
std::array< uint32_t, NumConfKeys >  confirmation_seeds 
)
inlineexplicit

Definition at line 434 of file zobrist.hpp.

◆ ZobristCoordinator() [4/4]

template<typename KeyType , size_t NumConfKeys>
boardstate::ZobristCoordinator< KeyType, NumConfKeys >::ZobristCoordinator ( uint32_t  prng_seed = (uint32_t)std::random_device{}())
inlineexplicit

Definition at line 442 of file zobrist.hpp.

Member Function Documentation

◆ board_state_hex_str()

template<typename KeyType , size_t NumConfKeys>
const std::string boardstate::ZobristCoordinator< KeyType, NumConfKeys >::board_state_hex_str ( )
inline

Definition at line 488 of file zobrist.hpp.

◆ ImplementFullBoardStateCalc()

template<typename KeyType , size_t NumConfKeys>
void boardstate::ZobristCoordinator< KeyType, NumConfKeys >::ImplementFullBoardStateCalc ( const BoardMap_t board_map)
inline

Definition at line 451 of file zobrist.hpp.

◆ ImplementGetState()

template<typename KeyType , size_t NumConfKeys>
KeyType boardstate::ZobristCoordinator< KeyType, NumConfKeys >::ImplementGetState ( )
inline

Definition at line 445 of file zobrist.hpp.

◆ ImplementGetTrData()

template<typename KeyType , size_t NumConfKeys>
moveselection::TranspositionTableSearchResult boardstate::ZobristCoordinator< KeyType, NumConfKeys >::ImplementGetTrData ( DepthType  search_depth,
MoveCountType  access_index 
)
inline

Definition at line 470 of file zobrist.hpp.

◆ ImplementGetTrTableSize()

template<typename KeyType , size_t NumConfKeys>
size_t boardstate::ZobristCoordinator< KeyType, NumConfKeys >::ImplementGetTrTableSize ( )
inline

Definition at line 481 of file zobrist.hpp.

◆ ImplementRecordTrData()

template<typename KeyType , size_t NumConfKeys>
void boardstate::ZobristCoordinator< KeyType, NumConfKeys >::ImplementRecordTrData ( DepthType  search_depth,
moveselection::MinimaxResultType  result_type,
moveselection::EqualScoreMoves similar_moves,
MoveCountType  access_index 
)
inline

Definition at line 455 of file zobrist.hpp.

◆ ImplementUpdateBoardState()

template<typename KeyType , size_t NumConfKeys>
void boardstate::ZobristCoordinator< KeyType, NumConfKeys >::ImplementUpdateBoardState ( const ExecutedMove executed_move)
inline

Definition at line 447 of file zobrist.hpp.

◆ ImplementUpdateMoveCounter()

template<typename KeyType , size_t NumConfKeys>
void boardstate::ZobristCoordinator< KeyType, NumConfKeys >::ImplementUpdateMoveCounter ( )
inline

Definition at line 483 of file zobrist.hpp.

◆ operator=()

template<typename KeyType , size_t NumConfKeys>
ZobristCoordinator & boardstate::ZobristCoordinator< KeyType, NumConfKeys >::operator= ( const ZobristCoordinator< KeyType, NumConfKeys > &  )
delete

◆ zkeys_seed()

template<typename KeyType , size_t NumConfKeys>
uint32_t boardstate::ZobristCoordinator< KeyType, NumConfKeys >::zkeys_seed ( )
inline

Definition at line 492 of file zobrist.hpp.

Member Data Documentation

◆ tr_table_

template<typename KeyType , size_t NumConfKeys>
TranspositionTable<KeyType, NumConfKeys> boardstate::ZobristCoordinator< KeyType, NumConfKeys >::tr_table_
private

Definition at line 418 of file zobrist.hpp.

◆ tr_table_guard_

template<typename KeyType , size_t NumConfKeys>
TranspositionTableGuard boardstate::ZobristCoordinator< KeyType, NumConfKeys >::tr_table_guard_
private

Definition at line 419 of file zobrist.hpp.

◆ tr_table_pruner_

template<typename KeyType , size_t NumConfKeys>
TranspositionTablePruner<KeyType, NumConfKeys> boardstate::ZobristCoordinator< KeyType, NumConfKeys >::tr_table_pruner_
private

Definition at line 420 of file zobrist.hpp.

◆ zobrist_component_

template<typename KeyType , size_t NumConfKeys>
ZobristComponent<KeyType, NumConfKeys> boardstate::ZobristCoordinator< KeyType, NumConfKeys >::zobrist_component_
private

Definition at line 417 of file zobrist.hpp.


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