Skip to content

Generic implementation of the MCTS algorithm for two-player board games

Notifications You must be signed in to change notification settings

yblein/mcts-boardgames

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MCTS Board Games

This is a generic Rust implementation of the Monte Carlo Tree Search (MCTS) algorithm for two-player board games. More precisely, the algorithm implemented is UCT (MCTS + UCB1 formula).

There is also a generic framework to make the games actually playable in the terminal. Several board games are featured as examples (international checkers, Connect Four, ...). You can find a quick tutorial explaining how to implement a complete game in no-time here.

   +---+---+---+
 3 |   | ⛀ |   |
   +---+---+---+
 2 |   | ⛂ |   |
   +---+---+---+
 1 |   | ⛂ | ⛀ |
   +---+---+---+
     a   b   c

White turn
Possible moves: a1 a2 c2 a3 c3
Coordinates to play? (e.g., a1)
> a2

The AI is not crazy strong at the moment, even when giving it more time to "think". Suggestions for improvement are welcomed.

Building Instructions

You need Rust stable and Cargo.

Clone this repository:

git clone https://github.com/yblein/mcts-boardgames.git

Build all the games provided:

cargo build

Run a specific game, e.g., checkers:

cargo run --bin checkers

About

Generic implementation of the MCTS algorithm for two-player board games

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages