splendor package

Subpackages

Submodules

splendor.game module

class splendor.game.Game(GameRule, agent_list, num_of_agent, seed=1, time_limit=1, warning_limit=3, displayer=None, agents_namelist=['Alice', 'Bob'], interactive=False)[source]

Bases: object

Run()[source]
class splendor.game.GameReplayer(GameRule, replay, displayer=None)[source]

Bases: object

Run()[source]

splendor.general_game_runner module

class splendor.general_game_runner.HidePrint(flag, file_path, f_name)[source]

Bases: object

splendor.general_game_runner.add_cwd_to_sys_path()[source]
splendor.general_game_runner.get_commit_time(repo: Repo)[source]

Returns the commit time based on the TIMEZONE

Parameters:

repo – the repository

Returns:

the commit time

splendor.general_game_runner.gitCloneTeam(team_info, output_path)[source]
splendor.general_game_runner.is_git_repo(path)[source]
splendor.general_game_runner.loadAgent(matches, superQuiet=True)[source]
splendor.general_game_runner.loadParameter()[source]

Processes the command used to run Yinsh from the command line.

splendor.general_game_runner.main()[source]

The main function called when advance_model.py is run from the command line:

> python runner.py

See the usage string for more details.

> python runner.py –help

splendor.general_game_runner.run(options, msg)[source]

splendor.template module

class splendor.template.Action[source]

Bases: object

class splendor.template.Agent(_id)[source]

Bases: object

SelectAction(actions, game_state, game_rule)[source]
class splendor.template.Displayer[source]

Bases: object

EndGame(game_state, scores)[source]
ExcuteAction(i, move, game_state)[source]
InitDisplayer(runner)[source]
TimeOutWarning(runner, id)[source]
class splendor.template.GameRule(num_of_agent=2)[source]

Bases: object

calScore(game_state, agent_id)[source]
gameEnds()[source]
generateSuccessor(game_state, action, agent_id)[source]
getCurrentAgentIndex()[source]
getLegalActions(game_state, agent_id)[source]
getNextAgentIndex()[source]
initialGameState()[source]
update(action)[source]
class splendor.template.GameState(num_of_agent, agent_id)[source]

Bases: object

splendor.utils module

splendor.utils.raiseNotDefined()[source]

splendor.version module

Version retrieval utility.

splendor.version.get_version() str[source]

extract the package version using importlib.

Module contents