ChineseCheckers
This project is a solver for two players' Chinese Checkers game using the Alpha Beta pruning algorithm. The program is written in C++ and uses a number of heuristics to improve the performance of the algorithm. Overall, the Chinese Checkers solver program has been built with performance in mind, and is designed to deliver fast and efficient game play. Whether you are playing against a bot or using the program as a library in your own project, you can be confident that the program will deliver high-performance results.
Loading...
Searching...
No Matches
intuition_data_generator.hpp
Go to the documentation of this file.
1/*
2 * This file is part of ChineseCheckers which is released under GNU General Public License v3.0.
3 * See file LICENSE or go to https://github.com/alexicanesse/ChineseCheckers/blob/main/LICENSE for full license details.
4 * Copyright 2022 - ENS de Lyon
5 */
6
15#ifndef INCLUDE_INTUITION_DATA_GENERATOR_HPP_
16#define INCLUDE_INTUITION_DATA_GENERATOR_HPP_
17
18/* C++ libraries */
19#include <vector>
20#include <string>
21#include <utility>
22#include <boost/unordered_map.hpp>
23/* The following pragma are used to removed depraction warning from boost
24 * header files. Using them avoid to remove this warning from the entire project.
25 */
26#pragma GCC diagnostic push
27#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
28#include <boost/python.hpp>
29#pragma GCC diagnostic pop
30
31/* Other */
32#include "Types.hpp"
33#include "AlphaBeta.hpp"
34
39 protected:
40 boost::unordered_map<bitBoards_t, uint_fast64_t, bitBoardsHasher, bitBoardsEqual> transposition_table_permanent_;
41 public:
47 std::pair<std::vector<bitBoards_t>, std::vector<double>>
48 evalAllMoves(int depth);
49
56 template<typename T>
57 void saveVectorToFile(const std::vector<T> &input,
58 const std::string &outputFileName);
59
65 void saveVectorOfBitBoardsToFiles(const std::vector<bitBoards_t> &input,
66 const std::string &outputFileNameW,
67 const std::string &outputFileNameB);
68
72 void fillTransTable();
73};
74
75#endif // INCLUDE_INTUITION_DATA_GENERATOR_HPP_
Alpha-Beta algorithm declaration.
Types definition.
The AlphaBeta class inherits from the ChineseCheckers class and provides an implementation of the alp...
Definition: AlphaBeta.hpp:43
This class is used to generate the data required for the intuition learning process.
Definition: intuition_data_generator.hpp:38
void fillTransTable()
Definition: intuition_data_generator.cpp:171
void saveVectorToFile(const std::vector< T > &input, const std::string &outputFileName)
Definition: intuition_data_generator.cpp:89
std::pair< std::vector< bitBoards_t >, std::vector< double > > evalAllMoves(int depth)
Definition: intuition_data_generator.cpp:117
void saveVectorOfBitBoardsToFiles(const std::vector< bitBoards_t > &input, const std::string &outputFileNameW, const std::string &outputFileNameB)
Definition: intuition_data_generator.cpp:100
boost::unordered_map< bitBoards_t, uint_fast64_t, bitBoardsHasher, bitBoardsEqual > transposition_table_permanent_
Definition: intuition_data_generator.hpp:40