The last time I've posted here was about 10 years ago. Time flies fast and I feel like this blog needs some sort of closure. My interests have changed and I no longer plan to post here nor to maintain any of the projects I've posted about on this blog. It was an interesting journey but it's time to move on. There's a lot of technology to learn and not a lot of time to embrace everything at once. This blog will remain as an archive but won't receive any new content. Thank you to everyone who found it useful. If you fancy on keeping up to date with me, find me on twdev.blog where I focus on general software engineering but mostly on C++. Once again, thank you!
While playing around with Arduino and Nokia LCD Screen I've decided to create some simple game. Obviously there's nothing simpler than tic-tac-toe. The game itself is trivial, everyone knows it so it should be pretty simple to learn the machine to be a good opponent. Yeah... Of, course I could write something really simple, like a translation table, in a sense that if player made a move A, then computer should do a move B... and describe all of the possible situations or "strategies". But that would be pretty primitive and not very appealing, wouldn't it ? Instead the obvious choice is to implement the MiniMax algorithm for this game. Of course, there a dozens of great articles available describing the basics and fundamentals of MiniMax and especially in tic-tac-toe context so, I'm not going to go into details regarding how it works. Instead I would like you to have a look on any of the links bellow to get at least some essentials: http://beej.us/bl...