Play Tic-Tac-Toe against the computer.
Player one is GREEN and player two is BLUE. By default you are player one and the computer is player two, but that can be swapped when starting a new game.
When you hover over a cell that can be marked it is highlighted in YELLOW. Click on a highlighted cell to make your mark. Try to get three marks in a row, column, or along a diagonal.
After you move, the computer will "think" and then make its move. The computer's move will be highligted with a dashed BLACK outline.
The computer uses JSMCTS, a javascript implementation of Monte Carlo Tree Search (MCTS) that runs in the browser, to select a move. It displays the moves it is evaluating and what percentage of the time those moves lead to a win. The number of trials it runs and the amount of time it has to run them can be controlled.
Repository: https://github.com/grwhitehead/jsmcts
Copyright 2022-2023 Greg Whitehead
MIT License