polyglot

package
v0.0.0-...-b4b1fef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MoveLimit int

Functions

func MoveToPolyMove

func MoveToPolyMove(move board.Move) string

Convert move to UCI move in general, castling moves are converted to polyglot castling move format ie e1g1 -> e1h1.

func PolyZobrist

func PolyZobrist(b *board.Board) uint64

func UCIToPolyMove

func UCIToPolyMove(move string) uint16

Types

type Book

type Book struct {
	// contains filtered or unexported fields
}

func LoadBook

func LoadBook(path string) *Book

func NewPolyglotBook

func NewPolyglotBook() *Book

func (*Book) AddFromPGN

func (pb *Book) AddFromPGN(game *pgn.PGN)

func (*Book) AddMove

func (pb *Book) AddMove(key uint64, move string, weight uint64)

func (*Book) NormalizeAndOrder

func (pb *Book) NormalizeAndOrder()

Building a book from a large number of games can exceed the limits of uint16. Find entries where a weight exceeds this limit and normalize the whole entry.

func (*Book) SaveBook

func (pb *Book) SaveBook(path string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL