13 Commits

Author SHA1 Message Date
48c93fa197 Renamed the benchmark file 2025-06-29 22:50:54 -07:00
854772a63d Improve UCB1-Tuned performance
We calculate the sample variance of the rewards online storing the value
in the node. This greatly reduces the amount of summations that need to
be done to calculate the variance during the selection phase.

While this burdens other selection algorithms, the cost is not
substantial.
2025-06-29 18:43:52 -07:00
44ef9ebdd8 Adding really stupid benchmark 2025-06-27 22:25:56 -07:00
6a33818238 We propagate the reward for both sides
The AI now properly choses the optimal path for the active player
2025-06-27 16:12:40 -07:00
0f9d4f0c4e Use Entry::or_default 2025-06-27 15:40:58 -07:00
9f893b0005 Upgrade rand to ~0.9 2025-06-27 15:17:45 -07:00
b80f039b93 Adding a basic print_tree function to visualize the MCTS search tree
This probably is not a good thing to run on a very large tree.
2025-06-27 15:00:43 -07:00
6cc6e6a7ba WeightedBackfillPropagation is implemented 2025-06-27 14:06:19 -07:00
37b1f56f74 Typo fix, the node is not mutable 2025-06-27 13:55:01 -07:00
3317c29480 Create a AI vs AI copy of tic-tac-toe 2025-06-27 13:45:49 -07:00
17884f4b90 Working MCTS implementation
This is a basic working implementation of the MCTS algorithm. Though
currently the algorithm is slow compared with other implemenations, and
makes sub-optimal choices when playing tic-tac-toe. Therefore some
modifications are needed
2025-06-27 13:34:49 -07:00
197a46996a Adding gitingore for rust 2025-06-12 11:13:49 -07:00
298d945b6b Initial commit 2025-06-12 11:11:51 -07:00