Skip to content

Implement Game.set_strategies to declare the strategy list of a player. - #1056

Open
d-kad wants to merge 6 commits into
gambitproject:masterfrom
d-kad:set_strategies
Open

Implement Game.set_strategies to declare the strategy list of a player.#1056
d-kad wants to merge 6 commits into
gambitproject:masterfrom
d-kad:set_strategies

Conversation

@d-kad

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

Copy link
Copy Markdown
Contributor

Description of the changes in this PR

Adds Game.set_strategies(player, strategies, drop=False, add=True), which declares the ordered
list of a player's strategies in a game in strategic form, matching by label. An entry matching a
current label keeps that strategy and the outcomes at its contingencies; an entry matching none
creates a strategy with no outcome at any of its contingencies; a current strategy whose label is
not listed is deleted, along with the outcomes at its contingencies. Listing the current labels in
a new order reorders the strategies, permuting the payoff table to match -- not previously
expressible. Deleting is destructive, so it must be confirmed with drop=True.

Game.add_strategy and Game.delete_strategy are removed, as set_strategies subsumes both.

@d-kad d-kad added this to the gambit-17.0.0.alpha.2 milestone Aug 18, 2026
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.

1 participant