Run a self-play game from a starting position until termination, with each side driven by a strategy function.
Usage
gm_play(
white = "engine",
black = "engine",
position = NULL,
max_moves = 200L,
verbose = TRUE
)Arguments
- white, black
Strategy functions. Each takes a gm_position and returns a single move in standard algebraic notation. Defaults to the native engine at depth 2. Character shortcuts
"random"and"engine"are also accepted.- position
Starting gm_position. Default is the standard start.
- max_moves
Maximum full moves before adjudication. Default
200.- verbose
If
TRUE(default), report each move.
Value
A gm_game object.
Details
A game ends on checkmate, stalemate, the fifty-move rule, threefold
repetition, insufficient mating material, or when max_moves full moves
have been played, in which case the game is adjudicated as a draw. The
termination reason is recorded in the game's Termination tag.
See also
Other play:
gm_simulate()