Description Usage Arguments Value Examples
Sending command position for chess engine. Info about position command from http://wbec-ridderkerk.nl/html/UCIProtocol.html set up the position described in fenstring on the internal board and play the moves on the internal chess board. if the game was played from the start position the string "startpos" will be sent Note: no "new" command is needed. However, if this position is from a different game than the last position sent to the engine, the GUI should have sent a "ucinewgame" inbetween.
1 | uci_position(engine, moves = NULL, startpos = TRUE, fen = NULL)
|
engine |
engine object |
moves |
string in long algebraic notation |
startpos |
boolean default TRUE |
fen |
string |
engine object
1 2 3 4 5 6 7 8 9 10 11 12 | # 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_position(e,moves = "e2e4")
e <- uci_go(e,depth = 10)
uci_quit(e)
# Using pipe '%>%' from magrittr:
require(magrittr)
uci_engine(engine_path) %>% uci_position(moves = "e2e4") %>%
uci_go(depth = 10) %>% uci_quit() %>% uci_parse()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.