parse_movetext: Parse movetext

View source: R/parse_movetext.R

parse_movetextR Documentation

Parse movetext

Description

The function parse_movetext() is the parser behind get_clocks() and get_evals().

Usage

parse_movetext(
  movetext,
  cmd_name,
  first_eval = NULL,
  mate0 = FALSE,
  mate_value = 50000
)

Arguments

movetext

A character vector of movetext, where each vector entry is for a separate game.

cmd_name

A single-element character vector of the command to parse

first_eval

(Default = NULL) A single-element integer vector indicating what value should be assigned to the initial position, before white's first move. The default (NULL) omits the first evaluation.

mate0

(Default = FALSE) A single-element boolean vector indicating whether to include a value for mated positions ('mate in 0').

mate_value

(Default = 35000) The value (in centipawns) to assign to positions evaluated as 'mate in x'.

Value

A list containing numeric vectors of the specified tag value. Each list entry is for a separate game. For get_clocks(), the value will be converted to seconds.


dryguy/rbitr documentation built on Oct. 15, 2024, 6:18 a.m.