I’ll skip the obligatory War Games reference and just ask you to try it out.
I suppose I could have made the AI a little smarter. Here was my thinking:
- check if AI has a winning move
- check if AI needs to block winning move of opponent
- check if center is open
- check if corner is open
- take any random open spot
But I know that there are a few other subtleties of TTT strategy. I should have researched TTT strategy before I started my AI. I’ll have to remember that for next time. Maybe I’ll come back and fix this up.
One more build to go! And I think Simon will be easier that this!