All Projects → revsic → AlphaZero-Connect6

revsic / AlphaZero-Connect6

Licence: MIT license
AlphaZero training framework for game Connect6 written in Rust with C++, Python interface.

Programming Languages

rust
11053 projects
C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language
CMake
9771 projects
Batchfile
5799 projects
powershell
5483 projects
shell
77523 projects

AlphaZero-Connect6

License Build Status Build Status codecov

AlphaZero training framework for game Connect6 written in Rust with C++, Python interface.

Copyright (c) 2018 YoungJoong Kim. AlphaZero-Connect6 is licensed under the MIT license.

  • Suppose to build Connect6 at Rust 1.28.0 or later.
  • Supported C++ standard is C++14 or later.
  • Supported Python version for bindings of libconnect6 is dependent on rust-cpython.
  • Tensorflow implementation of AlphaZero is based on python3.

Rust Usage

Install Rust compiler. rustup

curl https://sh.rustup.rs -sSf | sh  #for linux user
curl -sSf -o rustup-init.exe https://win.rustup.rs && rustup-init.exe  #for windows user

Sample program play connect6 with AlphaZero policy and RandomEvaluator.

cd Connect6 && cargo run -p sample

Python Usage

Install connect6 with setup.py (rust compiler is required).

cd Connect6/pybind; python setup.py build && pyton setup.py install;

For testing python bindness, use pytest at test_pybind.

cd Connect6/pybind/test_pybind; pytest;

Sample program play connect6 with AlphaZero policy and random evaluator.

For more complicated example, reference py_weighted

cd Connect6/sample && python -m python.random_policy

C++ Usage

Before using libconnect6 with C++ interface, it should be compiled in release mode.

cd Connect6 && cargo build --release

Single header connect6.hpp and sample CMakeLists.txt is supported.

For testing C++ bindness, build test_cppbind and run it.

# for linux
mkdir build && pushd build
cmake .. && make
./test_cppbind
popd

Sample program play connect6 with AlphaZero policy and random callback.

For more complicated example, reference cpp_weighted

cd Connect6/sample/cpp; ./build.sh && ./build/sample_exe  #for linux
cd Connect6/sample/cpp; ./build.ps1 && ./build/Release/sample_exe.exe  #for win-x64-msbuild
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].