Yet another Rust command-line project! I’ve actually wanted to make a Reversi solver for a while now, and after doing a bit of research into Monte Carlo Tree Searches (MCTS), I think this project will be a valuable learning experience. I was originally going to do Minimax with alpha-beta pruning, which would have been nicely deterministic, but I also foresaw that being a pain. I’ve played around with Minimax for simpler games, and while it’s conceptually straightforward, I felt like taking a break from the headache of pruning and optimizing a full search through an enormous game tree. Furthermore, recursion with mutable parameters is especially brutal with Rust’s borrow checker, and I suppose there isn’t much learning experience to be gained from applying a familiar algorithm to another game. Or, perhaps, I am simply lazy and looking for novelty. At any rate, MCTS is the route we’re going. Besides adding a fancy new algorithm to my toolbelt, my goal for this project is make my Rust code a little more idiomatic and tidy. I’ve lumped all the logic into lib.rs in my previous Rust projects, but now I’ve finally taken two minutes to look up how to properly extract modules into different files. :) I’m also going to define some custom traits and make heavier use of generics; my hope is that my code is modular enough that one could copy the MCTS part of the crate and apply it to a different game without making any modifications. As usual, there isn’t much of an exciting development in this first log. So far I’ve created a BoardPiece enum and a Board struct. Since Board just contains a couple u64s (for bitmasks) and a usize tuple for keeping track of the board’s dimensions, I’ve decided to derive the Copy trait to save myself further borrow checker woe. So far, tests are passing, and I can index the bitmasks just like a normal 2D array using the get_piece method I wrote. Since there isn’t much output to see, I thought I’d show some of the example code in the awesome auto-generated docs Cargo generated for me: