search

package
v0.0.0-...-011dee9 Latest Latest
Warning

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

Go to latest
Published: May 24, 2017 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const NegInf = math.MinInt16 + 2

Both constants are negatable and +1able without overflowing

View Source
const PosInf = math.MaxInt16 - 1
View Source
const QuiesceCutoffDepth = 5

Variables

View Source
var DefaultSearchThreads int = runtime.NumCPU()
View Source
var HistoryMap map[uint64]int = make(map[uint64]int)

Used to keep track of positions that have occurred in the game

Functions

func CalculateAllowedTime

func CalculateAllowedTime(b *dragontoothmg.Board, ourtime int, opptime int, ourinc int, oppinc int) int
func Search(board *dragontoothmg.Board, halt <-chan bool, stop *bool)

The main entrypoint for the search. Spawns the appropriate number of threads, and prints the results (including pv and bestmove).

func SearchTimeout

func SearchTimeout(halt chan<- bool, ms int, alreadyStopped *bool)

After a certain period of time, sends a signal to halt the search, if it has not already been sent. Also prints the best move. If the sleep time is 0, does nothing. The bool pointer alreadyStopped should be the same as the one given to Search().

Types

This section is empty.

Jump to

Keyboard shortcuts

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