A possibly (as far as I have tested) unbeatable NxN generic Tic Tac Toe AI logic, where linesize=N (check out java code: GenericTicTacToe.java)
Turns out there are ways to beat this AI, atleast in 3x3 board Click here for more details Suggestions welcome. As of now, added a ugly patch to overcome this particular case. And this time, wrote test.java and confirmed that AI is indeed unbeatable for 3x3 board.
To do: improve test.java to test 4x4 and higher board sizes
Individual images album of above gif
How to deploy
Asset Credits:
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
If you like to play Tic Tac Toe, check out my Android app Square Tic Tac Toe, where you have to form a Square instead of line!