C# Help - C# Community and Information

C# Tic Tac Toe

June 16th, 2006 in Other by admin


TicTacToe is a demonstration of the AI gameplaying minimax algorithm. The game plays out every possiblecombination 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 modifiedModel-View-Controller design pattern. In essence the core of the game(model) has a clean API and is only loosely coupled to GUI/ controllinglogic. I have two different implementations of the utility function,one using Regular Expressions (.NET is a superset of Perl 5functionality). To run the game using Regular Expressions uncomment thepre-processing directive '#define RegExp'.

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

Download: Executable 5 KB (Needs .Net Framework to run)
Download: Source Code 4 KB

Most Commented Articles :

Leave a Reply

RSS Feed Follow Us on Twitter!