dolegi / uci

Universal Chess Interface Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Universal Chess Interface

Small wrapper for interacting with uci compliant chess engines. Godoc

Usage

Import library

import "github.com/dolegi/uci"

Create a new engine

eng, _ := uci.NewEngine("path-to-engine")

Set options

eng.SetOption("Ponder", false)
eng.SetOption("Threads", "2")

Check if ready

eng.IsReady()

Create a new game, use full algorithmic positioning and assign white

eng.NewGame(uci.NewGameOpts{uci.ALG, uci.W})

Set the moves after start position

eng.Position("e2e4")

Find best move

resp := eng.Go(uci.GoOpts{MoveTime: 100})
fmt.Println(resp.Bestmove)

See example folder for a working example. Run with go run example/main.go <path-to-uci-engine>

Missing features

  • go infinite + stop
  • ponderhit
  • debug mode
  • register

References

About

Universal Chess Interface Library

License:MIT License


Languages

Language:Go 100.0%