Solving Tic-Tac-Toe with generic Monte Carlo Tree Search and Rust

2024-07-28

In a recent project, I explored what it is like making the computer smart enough to play the classic game of Tic Tac Toe and not totally suck at it. For that I implement the the Monte Carlo Tree Search algorithm, which is a long standing, simulation based, probilistic approach to solving turn based games.

However, only implementing the algorithm seemed a bit… boring, so the goal was to have a generic implementation that can be easily leveraged for playing other games as well. Along the way, I learned quite a few things about generics in Rust.

The code and some notes on the implementation can be found in the github repository, but the game can also be played on this website!