AlphaDeepChess, developing a chess engine based in alpha-beta pruning.
These instructions will help you set up and build the project on your local machine.
-
Download and install git and clone the repository:
sudo apt-get install git git clone https://github.com/LauraWangQiu/AlphaDeepChess.git
-
Install g++ and cmake:
sudo apt-get install g++ sudo apt-get install cmake
-
Go to the project folder and run the setup script for cmake:
cd ./AlphaDeepChess sudo chmod +x setupLinux.sh ./setupLinux.sh
-
Download and install git and clone the repository:
Download and install Git
git clone https://github.com/LauraWangQiu/AlphaDeepChess.git
-
Download g++(mingw) and cmake:
configure the PATH enviroment variable
configure cmake build foldercmake ../.. -DCMAKE_BUILD_TYPE=Debug -G "MinGW Makefiles"
-
Install homebrew, git and clone the repository:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" brew install git git clone https://github.com/LauraWangQiu/AlphaDeepChess.git -
Install g++ and cmake:
brew install gcc brew install cmake # PowerShell installation # brew install --cask powershell
-
Go to the project folder and run the setup script for cmake:
cd ./AlphaDeepChess chmod +x setupLinux.sh ./setupLinux.sh
-
Profile analysis with perf linux tool:
cd ./AlphaDeepChess chmod +x profile.sh ./profile.sh
To compare engines, we will use the cutechess tool. This tool allows us to run matches between two engines and get the results in a .pgn file and the final positions in a epd file. We will compare it with the stockfish engine.
We encourage you to take a look to the documentation of CuteChess to know how to download and build it from source if you want to use the latest version or use the graphical interface.
In an automated way, we created a script to download cutechess and stockfish portable version. To run it:
python .\setupComparator.pyThere should be a new directory called enginesComparator with the cutechess and stockfish portable version.
/enginesComparator
|-- /cutechess
| |-- cutechess-cli
| |-- ...
|-- /stockfish
| |-- /stockfish
| |-- stockfish_X_x86_64
| |-- ...To compare the engines, we will use the cutechess-cli tool. We will run a match between stockfish and our engine. To do so, we will use the compareEngines.py located in test/manual_tests.
python .\compareEngines.py -buildType [debug (default=release)] -games [num_games (default=10)] -tc [time_control (default=INF)] -st [search_time (default=INF)] -timemargin [time_margin (default=500ms)] -depth [depth (default=INF)] -concurrency [concurrency (default=0)]To run the tests, we will use the cutechess-cli tool. We will run a match between stockfish and our engine. To do so, we will use the tests.py located in test/manual_tests.
python .\tests.pyStandard Doxygen commenting format to be followed for documenting functions, structs, classes, and enums in the project.
#pragma once
/**
* @file template.hpp
* @brief Brief description of the file.
*
* Detailed description of the file.
*/
/**
* @file template.cpp
* @brief Brief description of the file.
*
* Detailed description of the file.
*/
/**
* @brief function_template
*
* Description of the function.
*
* @note Additional notes if needed.
*
* @param[in] inputParam Description of the input parameter.
* @param[out] outputParam Description of the output parameter.
*
* @return
* - 0 on success
* - -1 on error
*/
int function_template(int inputParam, int& outputParam);
/**
* @brief ClassName
*
* Detailed description of the class.
*/
class ClassName {
public:
/**
* Function comment
*/
ClassName();
/**
* Function comment
*/
int methodName(int paramName);
private:
/**
* @brief memberVariable
*
* Description of the private member.
*/
int memberVariable;
};
/**
* @brief StructName
*
* Description.
*
*/
struct StructName {
int memberVariable;
};
/**
* @brief EnumName.
*
* Description of the enum.
*/
enum class EnumName {
VALUE1, /**< Description of Value1 */
VALUE2, /**< Description of Value2 */
VALUE3 /**< Description of Value3 */
};
Execute AlphaDeepChessGUI.py to send commands as with the UCI and visualize the chessboard.