Reader Level:
Articles

Tic Tac Toe Game in VB.NET

By Paul Lockwood on November 08, 2012
TicTacToe is a demonstration of the AI game playing minimax algorithm. The game plays out every possible combination of moves from each position and consequently is unbeatable.
  • 0
  • 0
  • 2501
Download Files:
 

Description of the Article.

TicTacToe is a demonstration of the AI game playing minimax algorithm. The game plays out every possible combination of moves from each position and consequently is unbeatable. This example uses .NET Beta 2 and was written using a text editor. 

The source code uses a modified 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. I have two different implementations of the utility function, one using Regular Expressions (.NET is a superset of Perl 5 functionality). To run the game using Regular Expressions uncomment the preprocessing directive '#define RegExp'.

This code is fun and should be useful to anyone considering a degree in AI. 

Screenshot.

  tictactoePL.jpg

Paul Lockwood

Paul Lockwood has been a software consultant for eight years. He has a BSc and MEng in Microelectronics, and has worked for two of the big five consultancies. He is based in the UK but has also worked in the USA, Switze... Read more

COMMENT USING

Trending up