AlphaZero implementation using C++ and libtorch library. For testing was written small TicTacToe game also in C++. Program is divided in 4 main files:
- "network.h" - network architecture
- "alphazero.h" - alphazero algorithm
- "replay_buffer.h" - class for holding played games and providing samples
- "node.h" - node in ongoing game tree structure
Simply call with either "train" or "test" argument and optionally provide checkpoint with weights from where to start.
Example: ./alpha_zero train ttt_chk.pt
- Virtual loss and parallel playing
- Test on more games