/mcts

Command-line connect-four game backed by a Monte Carlo tree search reinforcement learning agent.

Primary LanguageRust

Connect Four

An interactive Connect Four command-line game, where two players attempt to be the first to connect four markings of their color.

game

Implementation:

This implementation provides an Ai opponent, which utilizes Monte Carlo tree search to search and learn optimal moves in self-play at runtime.

Monte Carlo search trees provide the foundation for more sophisticated reinforcement learning algorithms, such as AlphaZero, where node quality is evaluated by a neural network.

Rollout is currently performed by random simulation. For a simple game such as connect four, this already yields an agent of significant strength.

Usage:

cargo run --release