Skip to content

A C# machine learning library to solve simple games and puzzles.

License

Notifications You must be signed in to change notification settings

JonHaywood/Games.AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Games.AI Library

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:

  1. 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.
  2. 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.

Testing

To see how each game and algorithm are used see the Games.AI.Tests project.

Future Games to be Implemented

  • Connect Four, another simple adversarial game

About

A C# machine learning library to solve simple games and puzzles.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages