Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
- Implemented bespoke XML parser that handles the subset in the de-facto legacy XML workbook .gbt format;
removes dependency on tinyxml. (#897)

### Fixed
- Converting a behavior profile to a strategy profile, and computing pure-strategy payoffs
no longer inserts spurious entries into a strategy's internal action map.

## [16.7.0] - 2026-07-11

Expand Down
7 changes: 4 additions & 3 deletions src/games/game.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void GamePlayerRep::MakeStrategy(const std::map<GameInfosetRep *, int> &behav)
strategy->m_behav = behav;
for (const auto &infoset : m_infosets) {
strategy->m_label += (contains(strategy->m_behav, infoset.get()))
? std::to_string(strategy->m_behav[infoset.get()])
? std::to_string(strategy->m_behav.at(infoset.get()))
: "*";
}
if (strategy->m_label.empty()) {
Expand Down Expand Up @@ -305,8 +305,9 @@ MixedStrategyProfile<T>::MixedStrategyProfile(const MixedBehaviorProfile<T> &p_p
for (const auto &strategy : player->m_strategies) {
auto prob = static_cast<T>(1);
for (const auto &infoset : player->m_infosets) {
if (strategy->m_behav[infoset.get()] > 0) {
prob *= p_profile[infoset->GetAction(strategy->m_behav[infoset.get()])];
if (contains(strategy->m_behav, infoset.get()) &&
strategy->m_behav.at(infoset.get()) > 0) {
prob *= p_profile[infoset->GetAction(strategy->m_behav.at(infoset.get()))];
}
}
(*m_rep)[strategy] = prob;
Expand Down
2 changes: 1 addition & 1 deletion src/games/gametree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,7 @@ Rational TreePureStrategyProfileRep::GetPayoff(const GamePlayer &p_player) const
for (const auto &player : m_game->GetPlayers()) {
for (const auto &infoset : player->GetInfosets()) {
try {
behav.SetAction(infoset->GetAction(GetStrategy(player)->m_behav[infoset.get()]));
behav.SetAction(infoset->GetAction(GetStrategy(player)->m_behav.at(infoset.get())));
}
catch (std::out_of_range &) {
}
Expand Down
Loading