cram_gamelog: Deprecated alias for 'tabulate_gamelog()'

View source: R/tabulate_gamelog.R

cram_gamelogR Documentation

Deprecated alias for tabulate_gamelog()

Description

The tabulate_gamelog() function takes a list of vectors of engine analysis for a chess game and condenses it into a data frame for easier access.

Usage

cram_gamelog(
  gamelog,
  all_tags = FALSE,
  custom_tags = NULL,
  delete_blank_lines = TRUE
)

Arguments

gamelog

A list that contains vectors of engine analysis.

all_tags

(Default = FALSE) A Boolean. Setting all_tags = TRUE will search for all of the tags listed in the UCI protocol.

custom_tags

(Default = NULL) An optional character vector of custom tag names.

delete_blank_lines

(Default = TRUE) A Boolean. Setting this value to FALSE will leave blank rows/columns intact.

Details

The function tabulate_gamelog() parses output from a UCI-compatible chess engine.

tabulate_gamelog() is a wrapper for tabulate_positionlog() that loops over each position in the game, and adds a column indicating the position number. The gamelog parameter should contain output from the evaluate_game() function. The remaining parameters are passed to tabulate_positionlog(). See the documentation for tabulate_positionlog() for details.

The optional game_number parameter may be used to add a column indicating the game number. This is useful for keeping track of games when analyzing multiple games at once.

Value

A data frame summarizing the data for the game.

Note

tabulate_gamelog() does not change the class of the data it returns. Since the gamelog contains character data, columns originating from the gamelog will have class character. However, numeric indices added by tabulate_gamelog() (e.g., position and game_number) will have class integer.

See Also

The 'tabulate' functions tabulate analysis logs into data frames.

  • tabulate_positionlog() for condensing analysis of one position.

  • tabulate_gamelog() for condensing analysis of one game.

  • tabulate_pgnlog() for condensing analysis of an entire pgn file.

The 'parse' functions extract specific data from analysis logs.

  • parse_gamelog() for extracting data from one evaluated game.

  • parse_pgnlog() for extracting data from games in a pgn.

The 'evaluate' functions produce analysis logs.

  • evaluate_position() for analyzing chess positions.

  • evaluate_game() for analyzing individual games.

  • evaluate_pgn() for evaluating all the games in a PGN file.

Examples

gamelog <- list(c(
  "Stockfish 13 by the Stockfish developers (see AUTHORS file)",
  "readyok",
  "info string NNUE evaluation using nn-62ef826d1a6d.nnue enabled",
  "info depth 1 seldepth 1 multipv 1 score cp 146 nodes 30 nps 30000 tbhits 0 time 1 pv d2d4",
  "bestmove d2d4"
))
tabulate_gamelog(gamelog)

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