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.
|
This class simulates a game between two solvers. More...
#include <tournament.hpp>
Public Member Functions | |
GamePlayer () | |
Default constructor. | |
GamePlayer (int depth_) | |
A constructor used to set a custom depth. | |
GamePlayer (SolversIndividuals &solver1, SolversIndividuals &solver2, int depth_=1) | |
A constructor used to set custom solvers and a custom depth. | |
double | playGame () |
Member used to simulate a game between white_player and black_player. | |
void | set_white_player (SolversIndividuals &solver) |
Sets white_player. | |
void | set_black_player (SolversIndividuals &solver) |
Sets black_player. | |
void | set_depth (const int &depth_) |
Sets depth. | |
void | print_players_info () |
Prints information on the players. | |
int | constructor_test () |
Debug function used to test the constructors. | |
Private Attributes | |
AlphaBeta | white_player |
A solver using AlphaBeta. | |
AlphaBeta | black_player |
A solver using AlphaBeta. | |
int | depth |
The depth AlphaBeta will use. | |
This class simulates a game between two solvers.
GamePlayer::GamePlayer | ( | ) |
Default constructor.
GamePlayer::GamePlayer | ( | int | depth_ | ) |
A constructor used to set a custom depth.
GamePlayer::GamePlayer | ( | SolversIndividuals & | solver1, |
SolversIndividuals & | solver2, | ||
int | depth_ = 1 |
||
) |
A constructor used to set custom solvers and a custom depth.
int GamePlayer::constructor_test | ( | ) |
Debug function used to test the constructors.
double GamePlayer::playGame | ( | ) |
Member used to simulate a game between white_player and black_player.
void GamePlayer::print_players_info | ( | ) |
Prints information on the players.
void GamePlayer::set_black_player | ( | SolversIndividuals & | solver | ) |
void GamePlayer::set_depth | ( | const int & | depth_ | ) |
void GamePlayer::set_white_player | ( | SolversIndividuals & | solver | ) |
|
private |
The depth AlphaBeta will use.