I suspect that for tic-tac-toe one may be able to simply
hardwire all the possibilities factoring out simmetries and rotations
and it is surely possible to greatly simplify the algorithm because
the game tree isn’t that deep so we can see how the game ends.
While I was at summer camp I thought that we can just code where the user threatens to win, then make the AI always play there. If the user doesn’t threaten any win (the win variable is undefined or 0), the AI will try to create it’s own win.
Somewhat similar to what you said. I also saw that reversi game on the art expo!
It would be even cooler to develop a tic tac toe board that with each square is another tic tac toe and you have to when the indiviual tic tac toe to claim that square and where you play also determines which main box your opponent must play in next.
I think it was called Ultimate Tic-Tac-Toe? I also recall that when you play in a sub-grid, your opponent must go to the sub-grid that corresponds to the tile, so playing on the left side forces the other player to play on the left sub-grid.