Xiangiqgame
AI engine for Xiangqi
Loading...
Searching...
No Matches
xiangqipy.command_input.PlayerCommandInterpreter Class Reference

Converts command line input related to a player into PlayerInput object. More...

Collaboration diagram for xiangqipy.command_input.PlayerCommandInterpreter:
Collaboration graph

Public Member Functions

def __init__ (self, str player_input, str algo_input, int strength_input, int key_size_input, int zkeys_seed, int number_zobrist_states)
 
PlayerInput interpret_command (self)
 

Public Attributes

 player_input
 
 algo_input
 
 strength_input
 
 key_size_input
 
 zkeys_seed
 
 number_zobrist_states
 

Protected Member Functions

int _get_key_size (self)
 
int _get_strength (self)
 
int _get_number_zobrist_states (self)
 

Static Protected Attributes

dict _player_input_dispatch
 
dict _minimax_key_size_dispatch
 
int _default_key_size = 64
 
int _default_strength = 4
 
int _default_number_zobrist_states = 1
 

Detailed Description

Converts command line input related to a player into PlayerInput object.

Definition at line 147 of file command_input.py.

Constructor & Destructor Documentation

◆ __init__()

def xiangqipy.command_input.PlayerCommandInterpreter.__init__ (   self,
str  player_input,
str  algo_input,
int  strength_input,
int  key_size_input,
int  zkeys_seed,
int  number_zobrist_states 
)

Definition at line 170 of file command_input.py.

Member Function Documentation

◆ _get_key_size()

int xiangqipy.command_input.PlayerCommandInterpreter._get_key_size (   self)
protected

Definition at line 186 of file command_input.py.

◆ _get_number_zobrist_states()

int xiangqipy.command_input.PlayerCommandInterpreter._get_number_zobrist_states (   self)
protected

Definition at line 198 of file command_input.py.

◆ _get_strength()

int xiangqipy.command_input.PlayerCommandInterpreter._get_strength (   self)
protected

Definition at line 192 of file command_input.py.

◆ interpret_command()

PlayerInput xiangqipy.command_input.PlayerCommandInterpreter.interpret_command (   self)

Definition at line 204 of file command_input.py.

Member Data Documentation

◆ _default_key_size

int xiangqipy.command_input.PlayerCommandInterpreter._default_key_size = 64
staticprotected

Definition at line 164 of file command_input.py.

◆ _default_number_zobrist_states

int xiangqipy.command_input.PlayerCommandInterpreter._default_number_zobrist_states = 1
staticprotected

Definition at line 168 of file command_input.py.

◆ _default_strength

int xiangqipy.command_input.PlayerCommandInterpreter._default_strength = 4
staticprotected

Definition at line 166 of file command_input.py.

◆ _minimax_key_size_dispatch

dict xiangqipy.command_input.PlayerCommandInterpreter._minimax_key_size_dispatch
staticprotected
Initial value:
= {
32: xb.MinimaxMoveEvaluator32,
64: xb.MinimaxMoveEvaluator64,
128: xb.MinimaxMoveEvaluator128,
}

Definition at line 158 of file command_input.py.

◆ _player_input_dispatch

dict xiangqipy.command_input.PlayerCommandInterpreter._player_input_dispatch
staticprotected
Initial value:
= {
"ai": PlayerType.AI,
"person": PlayerType.HUMAN,
None: PlayerType.AI,
}

Definition at line 152 of file command_input.py.

◆ algo_input

xiangqipy.command_input.PlayerCommandInterpreter.algo_input

Definition at line 180 of file command_input.py.

◆ key_size_input

xiangqipy.command_input.PlayerCommandInterpreter.key_size_input

Definition at line 182 of file command_input.py.

◆ number_zobrist_states

xiangqipy.command_input.PlayerCommandInterpreter.number_zobrist_states

Definition at line 184 of file command_input.py.

◆ player_input

xiangqipy.command_input.PlayerCommandInterpreter.player_input

Definition at line 179 of file command_input.py.

◆ strength_input

xiangqipy.command_input.PlayerCommandInterpreter.strength_input

Definition at line 181 of file command_input.py.

◆ zkeys_seed

xiangqipy.command_input.PlayerCommandInterpreter.zkeys_seed

Definition at line 183 of file command_input.py.


The documentation for this class was generated from the following file: