pygambit.catalog.games#
- pygambit.catalog.games(num_actions: int | None = None, num_contingencies: int | None = None, num_infosets: int | None = None, is_const_sum: bool | None = None, is_perfect_recall: bool | None = None, is_tree: bool | None = None, num_nodes: int | None = None, num_outcomes: int | None = None, num_players: int | None = None, num_strategies: int | None = None, **metadata_filters) list[str]#
Return a list of catalog game class names.
- Parameters:
num_actions (int | None, default None) – If specified, only return games with the given number of actions.
num_contingencies (int | None, default None) – If specified, only return games with the given number of contingencies.
num_infosets (int | None, default None) – If specified, only return games with the given number of information sets.
is_const_sum (bool | None, default None) – If specified, only return games that are (or are not) constant-sum.
is_perfect_recall (bool | None, default None) – If specified, only return games that have (or do not have) perfect recall.
is_tree (bool | None, default None) – If specified, only return games that are (or are not) extensive-form.
num_nodes (int | None, default None) – If specified, only return games with the given number of nodes.
num_outcomes (int | None, default None) – If specified, only return games with the given number of outcomes.
num_strategies (int | None, default None) – If specified, only return games with the given number of strategies.
num_players (int | None, default None) – If specified, only return games with the given number of players.
**metadata_filters – Additional keyword arguments to filter by catalog.yml metadata fields. For example, x=1 filters for games with x: 1 in metadata.
- Returns:
List of game class names matching the specified filters.
- Return type:
list[str]
Examples
>>> games(x=1) # Games with a custom metadata field 'x' equal to 1 >>> games(is_tree=True, num_players=2) # 2-player extensive-form games
