TicTacToe Adventure icon

TicTacToe Adventure

Tiger Sun
Free
4.5 out of 5
100+ downloads

About TicTacToe Adventure

This is a 4x4x4 TicTacToe game with Artificial intelligence and Machine learning

1. How to play
In the board, there are 4 levels, 4 rows, and 4 columns, you will win if there are 4 pieces of yours connected in any horizontal, vertical, or diagonal line. Notice that the winning line includes the line cross different level, that means even the vertical line going from top level to bottom level is regarded as a wining line. All possible winning routes for each spot are shown as imagining line which will be displayed after touching certain spot.

2. Artificial intelligence
The Artificial intelligence in the game applies Minimax search with Alpha-beta pruning. The AI evaluating function is using linear weighted sum of features, the weights are hard coded for this part. The "Easy" difficulty is search 1 depth in Minimax search, "Normal" one is 2 depths, and "Nightmare" one is 3 depths.

3. Machine learning
The Machine learning part in the game is shown as the "green ring hint" in the "Human" mode and also the "LearntAI" mode. The "green ring hint" is the best move given by self-learning AI (1 depth of Minimax), you can follow the suggestion or make your own decision. The self-learning AI is pretty stupid at the beginning, but after any game was played (human vs computer or computer vs computer), this AI will automatically learn this game history, all the weights will be updated by Least mean square rule. So self-learning AI will be more and more intelligent after more games were played, you can feel the "green ring hint" will make much more sense after dozens of games. And if you kept on making "LearntAI" (updated after every game) play with "Easy" (hard coded), the "LearntAI" would always lose at the beginning, but finally have much more probability to win. The Artificial neural network hypothesis was finished but haven't enabled in the game, because it need more updates than linear hypothesis (slow), and it would be supported later when I found a better game mode to make it improve user experience.

By Tiger Sun

TicTacToe Adventure Screenshots