This is a classical Tic Tac Toe game, you can play it with a Bot. But, remember advance bot is pro enough to prove you a Noob.
https://ashu12chi.github.io/TicTacToe-Bot/.
https://github.com/ashu12chi/TicTacToe-Bot/blob/master/TicTacToe-Best.exe
This code is written for python3 but with very few changes it will work with python2 also.
http://web.cecs.pdx.edu/~bart/cs541-fall2001/homework/tictactoe-rules.html
When you start the game, it will ask you to choose among two options:
- Beginner
- Advance
Choose any one of the above two options, and play it with a Bot.
Remember!!! It is very difficult to win at advance level.
- Beginner:
It is using a very simple algorithm that follows following steps:
1. Check if AI can win in this step.
2. Check if player can win at next step.
3. Check if no moves left, game is a tie.
4. Find the first empty space and select it as a chance. - Advance:
This is one of the basic algorithm used in game theory, Minimax algorithm. This algorithm is very effective when game is played between two players.
It recursively check all possible moves, and can select a move which will result in maximising its chance of victory.
Game may run little slow, based on your device performance due to text to speech library.
1. Currently, game supports only beginner and advance levels, however medium level is also necessary
2. Improvement in GUI.
3. Introduction of series of games with improvement in algorithm, on the basis if it is required to play in attacking way or defensive way.