Xiangiqgame
AI engine for Xiangqi
Loading...
Searching...
No Matches
board_state_summarizer_interface.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
8
9using namespace gameboard;
10
15template <typename ConcreteBoardStateCoordinator, typename KeyType>
17public:
18 typedef KeyType ZobristKey_t;
19 void FullBoardStateCalc(const BoardMap_t &board_map) {
20 static_cast<ConcreteBoardStateCoordinator *>(this)->ImplementFullBoardStateCalc(
21 board_map
22 );
23 }
24
25 void UpdateBoardState(const ExecutedMove &move) {
26 return static_cast<ConcreteBoardStateCoordinator *>(this)->ImplementUpdateBoardState(
27 move
28 );
29 }
30
32 return static_cast<ConcreteBoardStateCoordinator *>(this)->ImplementGetState();
33 }
34
36 DepthType search_depth,
38 moveselection::EqualScoreMoves &similar_moves,
39 MoveCountType access_index
40 ) {
41 return static_cast<ConcreteBoardStateCoordinator *>(this)
42 ->ImplementRecordTrData(search_depth, result_type, similar_moves, access_index);
43 }
44
46 DepthType search_depth,
47 MoveCountType access_index
48 ) {
49 return static_cast<ConcreteBoardStateCoordinator *>(this)->ImplementGetTrData(
50 search_depth,
51 access_index
52 );
53 }
54
55 size_t GetTrTableSize() {
56 return static_cast<ConcreteBoardStateCoordinator *>(this)->ImplementGetTrTableSize();
57 }
58
60 return static_cast<ConcreteBoardStateCoordinator *>(this)->ImplementUpdateMoveCounter(
61 );
62 }
63};
CRTP Interface with methods to calculate / read / update hash values representing a board state; and ...
void FullBoardStateCalc(const BoardMap_t &board_map)
moveselection::TranspositionTableSearchResult GetTrData(DepthType search_depth, MoveCountType access_index)
void RecordTrData(DepthType search_depth, moveselection::MinimaxResultType result_type, moveselection::EqualScoreMoves &similar_moves, MoveCountType access_index)
void UpdateBoardState(const ExecutedMove &move)
Holds a gameboard::MoveCollection in which all gameboard::Move have the same value (as perceived by a...
Container for storing a moveselection::MinimaxCalcResult retrieved by a call to boardstate::SingleZob...
Data structs used by moveselection::MinimaxEvaluator.
uint16_t DepthType
uint16_t MoveCountType
Tracking piece positions and determining legal moves.
array< array< GamePiece, kNumFiles >, kNumRanks > BoardMap_t
2-D array of gameboard::GamePiece objects.
A change in the state of a gameboard::GameBoard represented by a gameboard::Move, and each of the gam...