Agents¶
The othello.agent package contains an abstract base class Agent that all agent classes should be derived from. New agent types can be registered as plugins.
othello.agent.base¶
Abstract base class for agents.
othello.agent.human¶
Human agent module.
-
class
othello.agent.human.
Human
¶ Human agent.
-
static
notation_to_move
(move_input)¶ Convert notation string to Point instance.
- Parameters
move_input (
str
) – Notation to be converted.- Return type
- Returns
Move.
-
static
point_to_notation
(point)¶ Convert Point instance to notation string.
- Parameters
point (
Point
) – Point to be converted.- Return type
str
- Returns
Notation.
- Raises
NotationError – No notation exists for given point.
-
select_move
(game_state)¶ Select move using user input.
-
static
validate_input
(move_input)¶ Validate human input.
- Parameters
move_input (
str
) – Notation input.- Raises
InvalidInputError – Input is not valid move notation.
- Return type
None
-
static
-
exception
othello.agent.human.
InvalidInputError
¶ Exception class for when input is not a valid move selection.
-
exception
othello.agent.human.
NotationError
¶ Exception class for when game notation related errors.