It’s been nearly a month since my last post, ai ai ai. Well, today Assignment 1 is due. I spent a lot of time working on it and debugging it. Admittedly I took a while getting a start on it – I’ve been a bit distracted.
But let’s talk about the Assignment. Wow was it frustrating, but fun. The first 70% worth of the assignment was rather easy-going though. It’s that last 22% (not counting the animation of the console). There was a lot of time spent staring at the debugger in IDLE. I spent long hours contemplating how my mind went about performing moves when I played the game, and how I could translate that into an algorithm for the program to follow.
In hindsight, now that the assignment is completed and handed in, the solution feels rather obvious. Or, at least, you can state in in a manner whereby one feels ridiculous for not having noticed that from the onset.
The most fun part about it for me was finding the optimal i value. For a while, I was sure it was
i//2, but as I delved more into the debugger and understood errors, I quickly learned the importance of the number 3. Indeed, I wish I had thought about it more. Looking back at the idea of induction, it’s fairly glaring that 3 is one of the most important numbers to deal with as one tackles this problem.
This was a really fun foray into recursion and OOP. There were many “wtf”s from me, and scribbles with pen and paper holding my thoughts. Many a commented section of code was written and re-written and edited. They joy of programming, eh?