19template <
typename KeyType, BoardStateCalculatorRegistryConcept G>
26 std::shared_ptr<G> game_board,
27 uint32_t prng_seed = std::random_device{}()
30 new_calculator->FullBoardStateCalc(game_board->map());
31 game_board->AttachMoveCallback(std::bind(
37 return new_calculator;
41 uint32_t prng_seed = std::random_device{}()
47template <
typename KeyType,
size_t NumConfKeys, BoardStateCalculatorRegistryConcept G>
54 std::array<std::shared_ptr<ZobristCalculatorType>, NumConfKeys>;
57 std::shared_ptr<G> game_board,
58 uint32_t prng_seed = std::random_device{}()
60 std::mt19937 prng{prng_seed};
62 auto primary_calculator =
64 std::array<std::shared_ptr<ZobristCalculatorType>, NumConfKeys>
65 confirmation_calculators;
66 for (
auto idx = 0; idx < NumConfKeys; ++idx) {
67 confirmation_calculators[idx] =
72 confirmation_calculators,
78 std::shared_ptr<ZobristCalculatorType> primary_calculator,
80 uint32_t prng_seed = 0
84 confirmation_calculators,
90 uint32_t prng_seed = std::random_device{}()
92 std::mt19937 prng{prng_seed};
94 auto primary_calculator =
96 std::array<std::shared_ptr<ZobristCalculatorType>, NumConfKeys>
97 confirmation_calculators;
98 for (
auto idx = 0; idx < NumConfKeys; ++idx) {
99 confirmation_calculators[idx] =
104 confirmation_calculators,
113template <
typename KeyType,
size_t NumConfKeys, BoardStateCalculatorRegistryConcept G>
123 std::shared_ptr<G> game_board,
124 uint32_t zobrist_component_seed = std::random_device{}()
129 zobrist_component_seed
std::shared_ptr< ZobristCalculatorType > CreateUnregistereCalculator(uint32_t prng_seed=std::random_device{}())
std::shared_ptr< ZobristCalculatorType > CreateRegisteredCalculator(std::shared_ptr< G > game_board, uint32_t prng_seed=std::random_device{}())
Creates a new ZobristCalculator, initializes its state using pre-existing GameBoard,...
Uses Zobrist hashing to calculate a "reasonably unique" integer value for each board configuration en...
static std::shared_ptr< ZobristCalculatorForConcepts< K > > Create(uint32_t seed=std::random_device{}())
void UpdateBoardState(const gameboard::ExecutedMove &executed_move)
std::shared_ptr< ZobristComponentType > CreateUnregisteredComponent(std::shared_ptr< ZobristCalculatorType > primary_calculator, ConfCalculatorsArrayType confirmation_calculators, uint32_t prng_seed=0)
std::array< std::shared_ptr< ZobristCalculatorType >, NumConfKeys > ConfCalculatorsArrayType
ZobristCalculatorFactory< KeyType, G > zobrist_calculator_factory_
std::shared_ptr< ZobristComponentType > CreateRegisteredComponent(std::shared_ptr< G > game_board, uint32_t prng_seed=std::random_device{}())
std::shared_ptr< ZobristComponentType > CreateUnregisteredComponent(uint32_t prng_seed=std::random_device{}())
Container for one or more boardstate::ZobristCalculatorForConcepts objects.
static std::shared_ptr< ZobristComponentForConcepts< C, N > > Create(uint32_t prng_seed=std::random_device{}())
std::shared_ptr< ZobristCoordinatorType > CreateRegisteredCoordinator(std::shared_ptr< G > game_board, uint32_t zobrist_component_seed=std::random_device{}())
ZobristComponentFactoryType zobrist_component_factory_
ZobristComponentFactory< KeyType, NumConfKeys, G > ZobristComponentFactoryType
static std::shared_ptr< ZobristCoordinatorForConcepts< M > > Create(std::shared_ptr< M > zobrist_component)
Calculate / manage board state and associate Minimax results.