Introduction
This is a Connect 4 game based on Silverlight. It contains computer AI that uses the Alpha Beta algorithm (a better alternative of Min Max algorithm).
Play the game here.
Background
The Alpha beta algorithm can be used in any turn based strategy game. A detailed explanation of these algorithms can be found in the following articles:
Using the Code
The solution contains the following projects:
GameThinking
A class library that contains the alpha beta algorithm. It’s implemented using generics so that this algorithm could be used with any game in the future.
Connect4Core
This is a library for connect4 games. It only contains data and logic and doesn't contain anything specific to Silverlight. It could be useful if you want to port it to another platform.
Contains the following classes:
Connect4
This is the main Silverlight application. It has Silverlight user controls that provide the presentation logic of the above data classes.
History
- 11th April, 2009: Initial post