Description Usage Arguments Value Examples
Analyze game using UCI engine and R API
1 | analyze_game(engine, san = NULL, lan = NULL, quiet = FALSE, ...)
|
engine |
engine path or engine object from uci_engine() |
san |
movetext in short algebraic notation, default NULL |
lan |
movetext in long algebraic notation, default NULL |
quiet |
boolean, hide system messages? Default FALSE |
... |
further arguments passed directly to uci_go(), i.e. depth = 10 |
list containg analyze_position() result (score and bestlines) for each move in the game. Note that if black moves, then score is multiplied by -1.
1 2 3 4 5 6 7 8 9 10 | # Linux (make sure you have executable permission):
engine_path <- "./stockfish_10_x64"
# Windows
# engine_path <- "./stockfish_10_x64.exe"
g <- "1. e4 e5 2. Nf3 Nc6 3. d4 exd4 4. Bc4 Nf6 5. O-O Be7"
G <- analyze_game(engine_path,san = g ,depth = 20)
G[[1]] # handles info about first move in the game
G[[1]]$comment # "book"
G[[10]]$curmove_san # "Be7"
G[[10]]$score # 62
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.