Marist Artificial Intelligence class final project.
Anthony Barranco & Phil Picinic
Bunduru Chess AI uses a multithreaded Negascout (or Principal Variation Search)
with a Quiescence Search as a secondary search.
Negascout search builds upon the
NegaMax framework which is a simplification of minimax search and uses alpha-beta
pruning and null window searches. It uses an MVV/LVA (most valuable victim-
least valuable attacker) sorting of moves to create optimal pruning.
Quiescence search is our secondary search that starts when Negascout reaches the
end at depth 0 to alleviate a horizon effect.
Quiescence search only considers
capture moves that are always sorted by MVV/LVA as well as alpha-beta pruning.
The AI uses a dynamic depth that is gauged by a guess on the current and previous search’s branching factor and the time taken during the last search. Dynamic depth is also adjusted by minimum and maximum depth margins decided by the state of the game: early, middle, end, and late end. The states of the game are decided by the number of pieces on the board remaining.
The evaluation function considers the entire board state. All pieces have assigned value, and the totals are added together per color. Eval has many factors besides just material values such as mid game and end game bonuses, isolated and doubled pawn files, piece location tables, attack and defend bonuses, and offset values for checks and checkmates.
- To compile the code on Windows either:
- Import the project in Visual Studio 2013 and build (sln file)
- Compile .NET 4.5 directly
- To compile the code on Mac, Mono must be installed.
- Please note that it has not been tested on Mac with Mono.
Create a game at: http://bencarle.com/chess/newgame
The engine can run by running the executable with the following command line arguments:
- team color (true for white, false for black)
- the game id
- the team id
- the secret id
The following is an example of team 1 playing as white in game 638:
ChessAI.exe true 638 1 3268cae
C# is an elegant, simple, type-safe object oriented language.
It supports a huge array of easy-to-use libraries built right into .NET from Microsoft as well. From simple to use multithreaded functions to native Windows GUI manipulation and features.
The .NET foundation is also working to foster open development and pushing open source. Microsoft is actively building on .NET and pushing development all the time. http://www.dotnetfoundation.org/