Written by Michael Studer on 2014-02-14
This game is a simple web-based Tic-Tac-Toe game implemented in JavaScript. It utilizes Bootstrap and jQuery on the front-end and has a JavaScript back-end.
The challenge with this project was to create an interactive game experience in which the AI could never lose.
This was accomplished by utilizing a minimax algorithm to explore at all possible future moves for a given board/player minimizing loss and maximizing gains.
In addition to the minimax algorithm, I also implemented alpha/beta pruning to greatly reduce computational times. When examining any given game path, if the result is less than ideal play the entire traversal of that path is abandoned eliminating fruitless computation only to arrive at a better game path elsewhere.