Small wrapper for interacting with uci compliant chess engines. Godoc
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>
- go infinite + stop
- ponderhit
- debug mode
- register