uci_parse: Parse GUI commands from chess engine

Description Usage Arguments Value Examples

View source: R/uci_parse.R

Description

Parse GUI commands from chess engine.

Usage

1
uci_parse(ucilog, filter = "bestmove")

Arguments

ucilog

strings from uci_quit() or uci_read()$temp

filter

string, one of 'bestmove' (default), 'score' or 'bestline'

Value

strings with parsed information from engine

Examples

 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"
require(processx)
e <- uci_engine(engine_path)
e <- uci_go(depth = 10)
rslt <- uci_quit(e)
uci_parse(rslt)
# Using pipe '%>%' from magrittr:
require(magrittr)
uci_engine(engine_path) %>% uci_go(depth = 10) %>% uci_quit() %>% uci_parse()

bigchess documentation built on Aug. 5, 2020, 5:09 p.m.