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()
Used to keep track of positions that have occurred in the game
Functions ¶
func CalculateAllowedTime ¶
func Search ¶
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.