Skip to content

Commit ee495e5

Browse files
Made m_reachableInfosets consistent with m_infosetReachable
1 parent 6292dd9 commit ee495e5

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/games/behavspt.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,14 +331,13 @@ void BehaviorSupportProfile::FindReachableInfosets(GameNode p_node) const
331331
{
332332
if (!p_node->IsTerminal()) {
333333
auto infoset = p_node->GetInfoset();
334-
334+
(*m_reachableInfosets)[infoset] = true;
335335
if (p_node->GetPlayer()->IsChance()) {
336336
for (auto action : infoset->GetActions()) {
337337
FindReachableInfosets(p_node->GetChild(action));
338338
}
339339
}
340340
else {
341-
(*m_reachableInfosets)[infoset] = true;
342341
for (auto action : GetActions(infoset)) {
343342
FindReachableInfosets(p_node->GetChild(action));
344343
}

src/games/behavspt.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ class BehaviorSupportProfile {
158158
{
159159
auto reachable_infosets = m_support->GetReachableInfosets();
160160
size_t count = 0;
161-
for (auto [key, value] : *reachable_infosets) {
162-
if (value) {
161+
for (auto [infoset, is_reachable] : *reachable_infosets) {
162+
if (is_reachable && !infoset->GetPlayer()->IsChance()) {
163163
++count;
164164
}
165165
}

0 commit comments

Comments
 (0)