Documentation ¶
Overview ¶
Package uci (partly) implements the UCI protocol for communicating with chess engines.
Index ¶
- Variables
- type BoolOption
- type Engine
- func (e *Engine) Options() map[string]engine.Option
- func (e *Engine) Ping() error
- func (e *Engine) Quit()
- func (e *Engine) Search() <-chan engine.Info
- func (e *Engine) SearchClock(wtime, btime, winc, binc time.Duration, movesToGo int) <-chan engine.Info
- func (e *Engine) SearchDepth(depth int) <-chan engine.Info
- func (e *Engine) SearchTime(t time.Duration) <-chan engine.Info
- func (e *Engine) Send(cmd string) error
- func (e *Engine) SetPosition(board *chess.Board)
- func (e *Engine) Stop()
- type Info
- type IntOption
- type StringOption
Constants ¶
This section is empty.
Variables ¶
View Source
var CommunicationTimeout time.Duration = 3 * time.Second
CommunicationTimeout is the time to wait for a response from the engine. If the engine fails to respond, it is terminated.
Functions ¶
This section is empty.
Types ¶
type BoolOption ¶
type BoolOption struct {
// contains filtered or unexported fields
}
func (*BoolOption) Bool ¶
func (b *BoolOption) Bool() bool
func (*BoolOption) Default ¶
func (b *BoolOption) Default() bool
func (*BoolOption) Set ¶
func (b *BoolOption) Set(value string)
func (*BoolOption) SetBool ¶
func (b *BoolOption) SetBool(v bool)
func (*BoolOption) String ¶
func (b *BoolOption) String() string
func (*BoolOption) StringDefault ¶
func (b *BoolOption) StringDefault() string
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine represents a running UCI engine.
func Run ¶
Run starts an engine executable, with the given arguments. If logger is not nil, it will be used to log all communication to and from the engine.
func (*Engine) SearchClock ¶
func (e *Engine) SearchClock(wtime, btime, winc, binc time.Duration, movesToGo int) <-chan engine.Info
SearchClock implements engine.Engine.
func (*Engine) SearchDepth ¶
SearchDepth implements engine.Engine.
func (*Engine) SearchTime ¶
SearchTime implements engine.Engine.
func (*Engine) SetPosition ¶
SetPosition implements engine.Engine.
type Info ¶
type Info struct {
// contains filtered or unexported fields
}
func (Info) BestMoveRaw ¶
type IntOption ¶
type IntOption struct {
// contains filtered or unexported fields
}
func (*IntOption) StringDefault ¶
type StringOption ¶
type StringOption struct {
// contains filtered or unexported fields
}
func (*StringOption) Set ¶
func (s *StringOption) Set(value string)
func (*StringOption) String ¶
func (s *StringOption) String() string
func (*StringOption) StringDefault ¶
func (s *StringOption) StringDefault() string
Click to show internal directories.
Click to hide internal directories.