This is a library made (mostly) for fun. It's a C# library that contains machine learning algorithms that solve a handful of different types of games. The library attempts to provide a common layer of abstraction over similar types of games. This provides a couple of nice benefits:
- When a new type of game is added all that's needed is to implement the expected game/board interfaces. The existing algorithm will solve it automatically.
- We can experiment with swapping out the existing algorithm across different games and not have to worry about game-specific implementation details.
The games implemented in the solution are:
- Peg Board Puzzle Game - also known as the "Cracker Barrel Game". A simple depth-first-search algorithm is employed to find and record all possible solutions.
- Tic Tac Toe - An adversarial search is employed as the games depends on the move of an opponent. A minimax with alpha-beta pruning is used to solve for the best action for the computer given a particular board state.
- Checkers - Though the implementation is not complete, the same minimax algorithm is used to solve the for a best possible action.
To see how each game and algorithm are used see the Games.AI.Tests
project.
- Connect Four, another simple adversarial game