AI TicTacToe

on May 14 | in Angular, JavaScript | by | with No Comments

View Game

The above screenshot is of a¬†TicTacToe game built using Angular 2.0. The game has three settings Rookie, Pro, and “You Can’t Win”. The “Rookie” setting does not use any AI and just makes a random selection of the remaining tiles still in play. The “Pro” and “You Can’t Win” settings both use a MiniMax Algorithm to find the best possible tile for the computer to select. The “Pro” setting will occasionally not finish the MiniMax Algorithm and will return a value that is possibly not the best selection to simulate a user making a mistake. The “You Can’t Win” setting does not make mistakes and will always select the best available move which makes a draw or loss as the only possible out comes.



Pin It

Leave a Reply

Your email address will not be published. Required fields are marked *