My first day back to work, I delved back into the unbeatable tic tac toe computer player in my Clojure implementation. Having taking a step back from the code, I’ve noticed a few interesting elements about my old implmentation of the minimax algorithm. The first unnessary complexity that came apparent to me was the amount … More Programming…..It’s been a while.
We are used to in object oriented programming to pass variables into parameter arguments, return values from methods. What higher order functions allow us to do is pass in functions themselves into other functions as parameter arguments A popular example of a higher order function is the ‘map’ function found in various languages such as … More Higher order funcitons
One of the reason I struggle with minimax is that it’s a difficult to test drive. I like to first do the smallest thing possible that would get me started and make me feel like I’m doing something of value. I outlined a rough idea of what I want from the minimax algorithm. The first … More Attempting to test drive minimax
What is a perfect player? A game where you win or you draw but never lose. If two perfect players play, it should always be a draw Calculate all possible moves and calculate the best move A way to be a perfect player is to calculate all possible moves and give a score to each … More Minimax with Naughts and Crosses – Zero Sum Game
Okay, I admit. I was over confident in saying to my mentor that implementing minimax in Clojure would be straightforward, perhaps naively I thought that the language was well suited for minimax. Unsurprisingly, minimax in Clojure is challenging. I spent yesterday trying to break it down into it’s smallest parts. I began firstly by test … More Minimax in Clojure part 1
I performed my first ever Kata today. I completely understood what my mentor Chris said about how nerve wrecking the first experience will be but it does get better with practice. I had practice the roman numerals kata numerous times over the week but was still not happy with it, eventually accepting that the best … More Performed my first kata
I learned so much today and what’s more importantly I applied some non code skills I have learned through my apprenticeship. When things are going well, tests are passing, loose coupled code, straightforward refactoring, adding value. Life is easy. What I have been trying to improve on since the end of my 1st month of … More It’s okay….sometimes you just need to take enough breaks