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.
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:
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.
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:
This is the main Silverlight application. It has Silverlight user controls that provide the presentation logic of the above data classes.
- 11th April, 2009: Initial post