Interloop with Stockfish chess engine in c# language on .net platform
OS supported:
Package Manager:
PM> Install-Package Stockfish.NET -Version 1.0.7
.NET CLI:
> dotnet add package Stockfish.NET --version 1.0.7
Package reference
<PackageReference Include="Stockfish.NET" Version="1.0.7" />
You shold download stockfish engine in your OS. Current version, which tested and used (Stockfish 12)
static void Main(string[] args)
{
IStockfish stockfish = new Stockfish.NET.Stockfish(@"path\to\stockfish\file");
}
Input:
stockfish.SetPosition("e2e4", "e7e6");
Input:
var bestMove = stockfish.GetBestMove();
Output:
d2d4
Input:
var bestMove = stockfish.GetEvaluation();
Output:
cp
MIT License. Please see License file (LICENSE) for more information.