analyze_game {bigchess} | R Documentation |
Analyze game
Description
Analyze game using UCI engine and R API
Usage
analyze_game(engine, san = NULL, lan = NULL, quiet = FALSE, ...)
Arguments
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 |
Value
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.
Examples
# 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
[Package bigchess version 1.9.1 Index]