Description Usage Arguments Value Examples
Sending command go for chess engine. Info about go command from http://wbec-ridderkerk.nl/html/UCIProtocol.html start calculating on the current position set up with the "position" command. There are a number of commands that can follow this command, all will be sent in the same string. If one command is not send its value should be interpreted as it would not influence the search.
1 2 3 4 5 6 7 8 9 10 |
engine |
engine object |
depth |
integer depth (search x plies only) |
infinite |
boolean default FALSE. If TRUE, stoptime (next argument) should be defined |
stoptime |
integer default 1. Used in Sys.sleep after go infinite in egine. After this, uci_stop() is executed |
wtime |
integer default NULL (white has x msec left on the clock) |
btime |
integer default NULL (black has x msec left on the clock) |
winc |
integer default NULL (white increment per move in mseconds if x > 0) |
binc |
integer default NULL (black increment per move in mseconds if x > 0) |
engine object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Linux (make sure you have executable permission):
engine_path <- "./stockfish_10_x64"
# Windows
# engine_path <- "./stockfish_10_x64.exe"
e <- uci_engine(engine_path)
e <- uci_go(e,depth = 10)
uci_quit(e)
# Using pipe '%>%' from magrittr:
require(magrittr)
uci_engine(engine_path) %>% uci_go(depth = 10) %>% uci_quit()
# Find best answer for black after 1. e4 in 100 seconds:
uci_engine(engine_path) %>% uci_position(moves = "e2e4") %>%
uci_go(depth = 20) %>% uci_quit() %>% uci_parse()
# Find best answer for black after 1. e4 in 100 seconds:
uci_engine(engine_path) %>% uci_position(moves = "e2e4") %>%
uci_go(infinite = TRUE,stoptime = 100) %>% uci_quit() %>% uci_parse()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.