Xiangiqgame
AI engine for Xiangqi
Loading...
Searching...
No Matches
xiangqipy.player_summary.PlayerSummary Class Reference

Data container for data from one xiangqipy.game_interfaces.Player in a Game. More...

Collaboration diagram for xiangqipy.player_summary.PlayerSummary:
Collaboration graph

Public Member Functions

bool has_search_summaries (self)
 Property indicating if PlayerSummary object has search summaries.
 
int player_move_count (self)
 Number of moves selected by Player during Game.
 
List[int] game_move_numbers (self)
 Converts Players' move numbers in to overall Game Move numbers (red = odd ints, black = even ints).
 
Dict[str, pd.DataFrame]|None first_searches_by_type_and_depth (self)
 Dictionary with strings corresponding to xiangqi_xb.MinimaxResultType values as keys, and DataFrame of result type counts as values.
 
pd.DataFrame|None first_searches_by_type (self)
 Dataframe with row -> move number, col -> xiangqi_xb.MinimaxResultType.
 
int|None tr_table_size_first_illegal_move_request (self)
 Transposition table size the first time any illegal move was returned by first search.
 
int|None tr_table_size_end_game (self)
 Size of transposition table at end of game.
 
cdm.TranspositionTableSizesAtEvents tr_table_sizes_at_events (self)
 Transposition table size at first illegal move and end of game wrapped into single convenience property.
 
pd.DataFrame|None first_search_stats (self)
 Dataframe with row -> move number; cols -> number of nodes explored, total time for move selection, average time per node, and minimax evaluation score of the selected move.
 
pd.Series|None selection_stats (self)
 Pandas Series with mean & max nodes per move, mean & max time per move, and number of illegal move requests.
 

Public Attributes

 color
 

Static Public Attributes

xb color .PieceColor
 
PlayerType player_type
 
EvaluatorType move_evaluator_type = EvaluatorType.NULL
 
int max_search_depth = None
 
int zobrist_key_size = None
 
int zkeys_seed = None
 
cdm search_summaries = None
 

Detailed Description

Data container for data from one xiangqipy.game_interfaces.Player in a Game.

Parameters
colorxiangi_xb.PieceColoar: color of Player the summary belongs to.
player_typexiangipy.enums.PlayerType: type of the Player.
move_evaluator_typexiangqipy.enums.EvaluatorType: type of Player's move evaluator.
max_search_depthint: maximum depth that a Minimax move evaluator will search.
search_summariesxiangqipy.core_dataclass_mirrors.SearchSummaries: container with summary data of each Move selected by Player.

Definition at line 18 of file player_summary.py.

Member Function Documentation

◆ first_search_stats()

pd.DataFrame | None xiangqipy.player_summary.PlayerSummary.first_search_stats (   self)

Dataframe with row -> move number; cols -> number of nodes explored, total time for move selection, average time per node, and minimax evaluation score of the selected move.

Definition at line 177 of file player_summary.py.

◆ first_searches_by_type()

pd.DataFrame | None xiangqipy.player_summary.PlayerSummary.first_searches_by_type (   self)

Dataframe with row -> move number, col -> xiangqi_xb.MinimaxResultType.

Named 'first_searches...' in constrast to 'extra_searches...' or 'second_searches...' which would occur if first_search of MinimaxMoveEvaluator.select_move returns an illegal move. After fixing bug that was allowing moves that violated repeated move rule to be returned by first search, have never recorded any second searches.

Definition at line 98 of file player_summary.py.

◆ first_searches_by_type_and_depth()

Dict[str, pd.DataFrame] | None xiangqipy.player_summary.PlayerSummary.first_searches_by_type_and_depth (   self)

Dictionary with strings corresponding to xiangqi_xb.MinimaxResultType values as keys, and DataFrame of result type counts as values.

Each row of data frame -> move number, each col -> a value of remaining search depth when result was obtained.

Definition at line 66 of file player_summary.py.

◆ game_move_numbers()

List[int] xiangqipy.player_summary.PlayerSummary.game_move_numbers (   self)

Converts Players' move numbers in to overall Game Move numbers (red = odd ints, black = even ints).

Definition at line 55 of file player_summary.py.

◆ has_search_summaries()

bool xiangqipy.player_summary.PlayerSummary.has_search_summaries (   self)

Property indicating if PlayerSummary object has search summaries.

Expect to be True for MinimaxMoveEvaluators, False otherwise.

Definition at line 39 of file player_summary.py.

◆ player_move_count()

int xiangqipy.player_summary.PlayerSummary.player_move_count (   self)

Number of moves selected by Player during Game.

Definition at line 48 of file player_summary.py.

◆ selection_stats()

pd.Series | None xiangqipy.player_summary.PlayerSummary.selection_stats (   self)

Pandas Series with mean & max nodes per move, mean & max time per move, and number of illegal move requests.

Definition at line 255 of file player_summary.py.

◆ tr_table_size_end_game()

int | None xiangqipy.player_summary.PlayerSummary.tr_table_size_end_game (   self)

Size of transposition table at end of game.

Definition at line 158 of file player_summary.py.

◆ tr_table_size_first_illegal_move_request()

int | None xiangqipy.player_summary.PlayerSummary.tr_table_size_first_illegal_move_request (   self)

Transposition table size the first time any illegal move was returned by first search.

This has been NaN after fixing first search's repeat move rule bug.

Definition at line 144 of file player_summary.py.

◆ tr_table_sizes_at_events()

cdm.TranspositionTableSizesAtEvents xiangqipy.player_summary.PlayerSummary.tr_table_sizes_at_events (   self)

Transposition table size at first illegal move and end of game wrapped into single convenience property.

Definition at line 166 of file player_summary.py.

Member Data Documentation

◆ color [1/2]

xb xiangqipy.player_summary.PlayerSummary.color .PieceColor
static

Definition at line 30 of file player_summary.py.

◆ color [2/2]

xiangqipy.player_summary.PlayerSummary.color

Definition at line 60 of file player_summary.py.

◆ max_search_depth

int xiangqipy.player_summary.PlayerSummary.max_search_depth = None
static

Definition at line 33 of file player_summary.py.

◆ move_evaluator_type

EvaluatorType xiangqipy.player_summary.PlayerSummary.move_evaluator_type = EvaluatorType.NULL
static

Definition at line 32 of file player_summary.py.

◆ player_type

PlayerType xiangqipy.player_summary.PlayerSummary.player_type
static

Definition at line 31 of file player_summary.py.

◆ search_summaries

cdm xiangqipy.player_summary.PlayerSummary.search_summaries = None
static

Definition at line 36 of file player_summary.py.

◆ zkeys_seed

int xiangqipy.player_summary.PlayerSummary.zkeys_seed = None
static

Definition at line 35 of file player_summary.py.

◆ zobrist_key_size

int xiangqipy.player_summary.PlayerSummary.zobrist_key_size = None
static

Definition at line 34 of file player_summary.py.


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