https://github.com/ipax77/pax.ucichessengine
C# dotnet 6 Universal Chess Interface wrapper for interacting with chess engine processes.
https://github.com/ipax77/pax.ucichessengine
chess dotnet engine uci wrapper-api
Last synced: 4 months ago
JSON representation
C# dotnet 6 Universal Chess Interface wrapper for interacting with chess engine processes.
- Host: GitHub
- URL: https://github.com/ipax77/pax.ucichessengine
- Owner: ipax77
- License: agpl-3.0
- Created: 2021-12-30T09:50:05.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-16T21:17:34.000Z (7 months ago)
- Last Synced: 2025-06-24T02:04:28.330Z (4 months ago)
- Topics: chess, dotnet, engine, uci, wrapper-api
- Language: C#
- Homepage:
- Size: 144 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Introduction
C# dotnet Universal Chess Interface wrapper for interacting with chess engine processes.
# Getting started
## Installation
You can install it with the Package Manager in your IDE or alternatively using the command line:```bash
dotnet add package pax.uciChessEngine
```
## UsageSample Project [pax.BlazorChess](https://github.com/ipax77/pax.BlazorChess)
```csharp
Engine engine = new Engine("EngineName", @"path\to\engine\binary");
await engine.Start();
await engine.IsReady();
var options = await engine.GetOptions();
await engine.SetOption("Threads", 4);
await engine.SetOption("MultiPV", 4);
await engine.Send("ucinewgame");
await engine.Send("go");
await Task.Delay(2000);
await engine.Send("stop");
await engine.IsReady();
var info = engine.GetInfo();for (int i = 0; i < info.PvInfos.Count; i++)
{
var pvInfo = info.PvInfos[i];
Evaluation eval = new Evaluation(pvInfo.Score, pvInfo.Mate, false);
Console.WriteLine($"pvInfo{i} - move: {pvInfo.Moves[0]}; eval: {eval}");
}
engine.Dispose();
```## ChangeLog
v0.6.1
>- ** Breaking Changes **
>- Update to dotnet 8
>- Logging disabled by default. Enable it with:
`
Engine engine = new Engine("EngineName", @"path\to\engine\binary", LogLevel.Warning);
`