Skip to content

Add make_chance_event and remove set_chance_probs - #1012

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

Add make_chance_event and remove set_chance_probs#1012
d-kad wants to merge 6 commits into
gambitproject:masterfrom
d-kad:make_chance_event

Conversation

@d-kad

@d-kad d-kad commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Issues closed by this PR

Description of the changes in this PR

This PR adds Game.make_chance_event(nodes, probs[, label]) and removes Game.set_chance_probs.

MakeChanceEvent is implemented in C++ as the parallel of MakeInfoset (#999). It additionally requires
a probability distribution, given either as a list matching the actions in order or as a possibly-sparse mapping
from action labels to numbers. Nodes need not already be chance nodes; personal decision nodes are converted.

set_chance_probs is removed, subsumed by make_chance_event.

Depends on GamePlayerRep::CheckInfosetLabel, extracted here from GameInfosetRep::SetLabel with no behaviour change; the same commit is on the #999 branch and will drop out on rebase.

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

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.

[API]: Develop make_chance_event

1 participant