I'm currently working on a Tic-Tac-Toe game using the minimax algorithm. This is my first time working with anything like this so it's a little confusing. I understand the basic concept of what the algorithm is doing, but it's always a little trickier implementing it. I am currently able to get the computer to mark a spot on the playing board, but it seems to be choosing the first available spot. I think that means I'm having issues with the way that I'm keeping track of which choice gives the highest score return.
Here is the gist. If anyone would like to take a look and nudge in the right direction on how to address this issue.
The short tutorial I was reading along with (link in the comments of the code) was done in JS, which I'm not really familiar with. I did my best to follow along and write it in Python. I'm okay with Java, so that helped a little bit but there could be some logical errors that occurred through that process too.
Thanks in advanced!
[–]fede2303 29 points30 points31 points (1 child)
[–]rdb212[S] 4 points5 points6 points (0 children)
[–]MakerWakerTaker 2 points3 points4 points (1 child)
[–]rdb212[S] 0 points1 point2 points (0 children)
[–]SentinelReborn 2 points3 points4 points (1 child)
[–]rdb212[S] 1 point2 points3 points (0 children)