An AI that plays Othello/Reversi
HERB is an Othello/Reversi bot written in Rust. Herb uses a modified Monte Carlo Tree Search (MCTS) algorithm that runs in parallel on multiple threads. The bulk of the logic is in the MCTS module and the Othello module.
Install the Rust compiler and associated tools:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shBuild the project using cargo (installed with rust)
cargo buildRun herb to interface with the referee, run herbvrandom to see Herb play against an
opponent making random moves:
cargo run --bin herb
cargo run --bin herbvrandomCleanup the build directory:
cargo clean- main.rs - runs a loop that plays through a game with the referee
- lib.rs - defines the interfaces and structs used to interface with the referee and Herb
- config.rs - configuration settings for Herb and the Monte Carlo Search
- mcts.rs - Monte Carlo Tree Search implementation
- othello.rs - Othello game engine
Note - I also have a minimax.rs and minimaxab.rs that implement Minimax and Minimax with Alpha-Beta Pruning. Herb can be setup to use them pretty easily, but it currently requires changing the code.
In lib.rs there is a Player trait and a GameInterface trait that need to be
implemented so that Herb can talk to different players/protocols. The only
implmentation so far is the the drmecref.rs file so that Herb can play against
opponents interfacing with Dr. Cameron's Referee program.