You'd Think I'd Be Used to This By Now
Meanwhile, back in the weeds…
This week I started incorporating the MiniMax algorithm into my tic-tac-toe game AI. The algorithm is designed to look through possible game scenarios, rank the outcomes, and then make a decision on the best move to make. It’s like when you play a board game against a friend and try to think of all the possible moves that can be made based on your next move.
Although I feel I have a good grasp on what the algorithm is supposed to do, getting that down into Ruby code is a whole other beast. Yesterday was another one of those days when I’m sure there was smoke billowing out my ears. I spent a lot of time in IRB, writing pseudo code, and sketching out what I wanted to make the data do. I tried several different approaches and after a few minutes of each I’d optimistically feel that I was mere keystrokes away from the solution… but then many more minutes would pass by before I’d finally take a break and decide to try a new tactic.
During Code Academy I wrote about the cycle of going in and out of the weeds and linked to this wonderful video about knife making. Learning something new is tough, and although I need to keep in mind that it still hasn’t even been six months since I wrote my first line of code– it still stings when “you cut yourself, you burn yourself, you f*!$ stuff up, you ruin something you worked on for like three weeks” (seriously, go watch the video).
In that post I also referenced the C.A. application question about “Why are you applying to Code Academy?”, but now there’s another question from the application that I finally understand why they asked. “Tell us about a time when you almost quit something, but chose not to.” My answer to that question boiled down to “pretty much my entire cycling career.” While I’m not saying that the thought of quitting coding has entered my mind, the thoughts when the smoke starts billowing out my ears are the same as when I’d go out and train mile after mile. But instead of “are my legs ever going to push this bike fast enough?”, I ask “is my brain ever going to wrap itself around this problem?”
And that’s when I take a break, maybe stare out the window, maybe ask for some help, maybe even close my eyes and lay down in the 8th Light hammock…and rest up for another push. Because as long as I keep moving forward, the answer will always be yes.