Posts for: #rust

Using the Minimax Algorithm to Crack Tictactoe

Using the Minimax Algorithm to Crack Tictactoe
Imagine you find yourself in a heated game of tic-tac-toe. Plotting your moves, you need to remember that each move you make should either get you closer to the win condition or move your opponent further from it. Of course, your opponent is going to be doing the same thing for each of their moves. While you can’t control how your opponent places their pieces to hinder you, each move has an effect on the options for the next player’s move.

Building a Recursive Descent Parser in Rust

Building a Recursive Descent Parser in Rust
Before I began my journey in learning Rust, I had been warned of its steep learning curve. Undeterred, I started following through some trivial examples in Rust’s (incredible) documentation. Things seemed intuitive, I really wasn’t seeing the difficulty people were warning me about. That was until I tried something less trivial. I decided to build a simple recursive descent parser in Rust, thinking I should be able to have something thrown together in an afternoon.