
Introduction
The Minimax algorithm is the brains behind this program. Minimax is the basis behind many AI game playing programs like Chess. Unlike Chess, with TicTacToe we have sufficient CPU power to play out every possible combination of moves from each position and consequently this game is unbeatable - forcing a draw is the best you will achieve.
The source code uses a Model-View-Controller design pattern. In essence the core of the game (model) has a clean API and is only loosely coupled to GUI/ controlling logic. There are two different implementations of the utility function, one using Regular Expressions. To run the game using Regular Expressions uncomment the pre-processing directive '#define RegExp'. This code should be useful to anyone considering a degree in AI.