stockStep: Calculate next move based on current position

Description Usage Arguments Value

Description

Given a board or a position string that can be accepted by UCI, calculate the next best move, opponents best move (ponder) and which player has the upper hand (score)

Usage

1
2
3
stockStep(board = NULL, posString = NULL, movetime = NULL,
  wtime = NULL, btime = NULL, depth = NULL, translate = FALSE,
  ponder = FALSE, stockfish = NULL)

Arguments

board

is an board generated by rchess. Mandatory if translate = TRUE

posString

is a string that can be accepted by a UCI as an alternative to board Will be ignored if board is defined

movetime

How much time should the engine spend on thinking

wtime

Alternative to movetime, must be provided with btime. How much time the white player has on the clock

btime

Alternative to movetime, must be provided with wtime. How much time the black player has on the clock.

depth

Alternative to movetime. The search depth.

translate

Should the move from the UCI be translated into standard chess notation. This format is accepted by rchess boards. You need to provide a board for this option to work instead of a posString

ponder

Not implemented yet. Should the engine continue to ponder

stockfish

A running UCI engine process. If NULL, a stockfish process will be spawned and stopped at the end of function execution.

Value

a list containing 4 elements. bestmove is the calculated best move by the engine. ponder is the opponent's best move against the engine's best move. score is engine's perception of how good it's position is. scoreType is the type of score. If its cp, upperbound or lowerbound, the score estimate is in centipawns. If it is mate, the score is a guess of how many turns till the opponents demise (or the engine's if its negative).


oganm/stockfisher documentation built on May 25, 2019, 10:43 p.m.