pygambit.catalog.load_openspiel#
- pygambit.catalog.load_openspiel(game_name: str, params: dict | None = None) Game#
Load a game from the OpenSpiel library.
- Parameters:
game_name (str) – The short name of the OpenSpiel game (e.g.
"matrix_rps","tiny_hanabi"). Passed directly topyspiel.load_game.params (dict, optional) – Game parameters forwarded to
pyspiel.load_game(e.g.{"players": 2, "coins": 3, "fields": 2}for"blotto"). See the OpenSpiel game list for available parameters per game.
- Returns:
The loaded game.
- Return type:
gbt.Game
- Raises:
ImportError – If
open_spielis not installed.ValueError – If the game’s dynamics type is not supported for export, or if the format exporter raises an error for this specific game.
Other exceptions from pyspiel.load_game propagate directly. – For example,
pyspiel.SpielErroris raised for unknown game names or invalid/missing parameters.
