# User Interface

## Session

AlphaZero.UserInterface.SessionMethod
Session(::Type{Game}, ::Type{Net}, params, netparams) where {Game, Net}

Create a new session using the given parameters, or load it from disk if it already exists.

Arguments

Optional keyword arguments

• dir: session directory in which all files and reports are saved; this argument is either a string or nothing (default), in which case the session won't be saved automatically and no file will be generated
• autosave=true: if set to false, the session won't be saved automatically nor any file will be generated
• nostdout=false: disables logging on the standard output when set to true
• benchmark=[]: vector of Benchmark.Duel to be used as a benchmark
• save_intermediate=false: if set to true (along with autosave), all intermediate training environments are saved on disk so that the whole training process can be analyzed later. This can consume a lot of disk space.
source
Session(env::Env[, dir])

Create a session from an initial environment.

• The iteration counter of the environment must be equal to 0
• If a session directory is provided, this directory must not exist yet

This constructor features the optional keyword arguments autosave, nostdout, benchmark and save_intermediate.

source

## Explorer

AlphaZero.UserInterface.ExplorerType
Explorer{Game}

A command interpreter to explore the internals of a player through interactive play.

Constructors

Explorer(player::AbstractPlayer, game=nothing; memory=nothing)

Build an explorer to investigate the behavior of player in a given game (by default, in the initial state). Optionally, a reference to a memory buffer can be provided, in which case additional state statistics will be displayed.

Explorer(env::Env, game=nothing; arena_mode=false)

Build an explorer for the MCTS player based on neural network env.bestnn and on parameters env.params.self_play.mcts or env.params.arena.mcts (depending on the value of arena_mode).

Commands

The following commands are currently implemented:

• do [action]: make the current player perform action. By default, the action of highest score is played.
• explore [num_sims]: run num_sims MCTS simulations from the current state (for MCTS players only).
• go: query the user for a state description and go to this state.
• flip: flip the board according to a random symmetry.
• undo: undo the effect of the previous command.
• restart: restart the explorer.
source