Players¶
-
class
AlphaZero.player.cmd_player.
Player
¶ Represents a player controlled by a human in the command line playing interface.
-
think
(state)¶ Asks the user for input and returns if it’s legal.
Parameters: state – the current game state. Returns: a tuple of the input move and None. Return type: tuple
-
ack
(move)¶ Does nothing.
Parameters: move – the move played. Returns: None
-
-
class
AlphaZero.player.mcts_player.
Player
(eval_fun, game_config, ext_config)¶ Represents a player playing according to Monto Carlo Tree Search.
-
think
(state, dirichlet=False)¶ Generate a move according to a game state.
Parameters: - state – a game state
- dirichlet – whether to apply dirichlet noise to the result prob distribution
Returns: The generated move and probabilities of moves
Return type: tuple
-
ack
(move)¶ Update the MCT.
Parameters: move – A new move
-
-
class
AlphaZero.player.nn_player.
Player
(nn_eval, game_config)¶ Represents a player playing according to an evaluation function.
-
think
(state)¶ Chooses the move with the highest probability by evaluating the current state with the evaluation function. :param state: the current game state.
Returns: a tuple of the calculated move and None. Return type: tuple
-
ack
(move)¶ Does nothing.
Parameters: move – the current move. Returns: None
-