ARTICLE

Tic Tac Toe Game in VB.NET

Posted by Paul Lockwood Articles | Visual Basic .NET 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.
Reader Level:
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

Login to add your contents and source code to this article
post comment
     
COMMENT USING
PREMIUM SPONSORS
Over-C is a holistic consortium of communications and technology specialists. We build, deploy and market both business as well as consumer products and solutions.
Get Career Advice from Experts
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Get Career Advice from Experts