You can play right in the console by running the code using an IDE or compiler of your choice. You mark your grid position by giving the grid row and column number. By default the player is X and the opponent is O. It's impossible to win against the AI opponent because it chooses the best possible move by going through all of them. This has been accomplished using the minimax algorithm and to reduce the time and space complexity, alpha beta pruning is used.
ashw1nbhat / tictactoe-ai Goto Github PK
View Code? Open in Web Editor NEWA perfect TicTacToe opponent written in C#