Skip to content

Implement Game.set_players to declare the player list of the game. - #1073

Merged
tturocy merged 9 commits into
gambitproject:masterfrom
d-kad:set_players
Aug 21, 2026
Merged

Implement Game.set_players to declare the player list of the game.#1073
tturocy merged 9 commits into
gambitproject:masterfrom
d-kad:set_players

Conversation

@d-kad

@d-kad d-kad commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Issues closed by this PR

Description of the changes in this PR

Adds Game.set_players(players, drop=False, add=True), which declares the ordered list of the game's players,
matching by label. An entry matching a current label refers to that player, which keeps its moves or strategies
and its payoffs at every outcome; an entry matching none creates a player, with no decisions in an extensive game
or a single strategy labeled "1" in a strategic game; a current player whose label is not listed is deleted.
Listing the current labels in a new order reorders the players, permuting the axes of the payoff table.

A player can only be deleted if it has no decisions (extensive game) or exactly one strategy (strategic game).

Game.add_player is removed.

@d-kad
d-kad requested a review from tturocy August 21, 2026 09:53
@tturocy
tturocy merged commit be734b6 into gambitproject:master Aug 21, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH]: Write set_players, remove new_player

2 participants