notakto.khaledhamam.com - Deployed on Fly.io
Notakto is a game where two players take turns placing X's on a board. The first player to get three in a row loses.
This implementation utilizes the Monte Carlo Tree Search (MCTS) algorithm. Initially, the computer selects random moves, gradually accumulating data on game outcomes. As it does so, it employs the Upper Confidence Bound for Trees (UCT) principle, striking a balance between exploring new possibilities and exploiting known strategies. Over time, this iterative process refines the computer's gameplay strategy, making it increasingly informed and strategic in its decisions.
Note: The iterations are set to 1000
This implementation is using Elixir and Phoenix LiveView. Why? Because I wanted to try it out ๐คท๐ปโโ๏ธ.
I used this repository as a reference for the implementation of the MCTS and copied the Zipper datastructre from it, I highly recommend checking it out.
To start the Phoenix server:
- Run
mix setup
to install and setup dependencies - Start Phoenix endpoint with
mix phx.server
or inside IEx withiex -S mix phx.server