@@ -73,8 +73,10 @@ void BehaviorSupportProfile::AddAction(const GameAction &p_action)
7373 if (pos == support.end () || *pos != p_action) {
7474 // Action is not in the support at the infoset; add at this location to keep sorted by number
7575 support.insert (pos, p_action);
76- for (const auto &node : GetMembers (p_action->GetInfoset ())) {
77- ActivateSubtree (node->GetChild (p_action));
76+ for (const auto &node : p_action->GetInfoset ()->GetMembers ()) {
77+ if (m_nonterminalReachable[node]) {
78+ ActivateSubtree (node->GetChild (p_action));
79+ }
7880 }
7981 }
8082}
@@ -86,8 +88,10 @@ bool BehaviorSupportProfile::RemoveAction(const GameAction &p_action)
8688 auto pos = std::find (support.begin (), support.end (), p_action);
8789 if (pos != support.end ()) {
8890 support.erase (pos);
89- for (const auto &node : GetMembers (p_action->GetInfoset ())) {
90- DeactivateSubtree (node->GetChild (p_action));
91+ for (const auto &node : p_action->GetInfoset ()->GetMembers ()) {
92+ if (m_nonterminalReachable[node]) {
93+ DeactivateSubtree (node->GetChild (p_action));
94+ }
9195 }
9296 return !support.empty ();
9397 }
@@ -139,17 +143,6 @@ void BehaviorSupportProfile::DeactivateSubtree(const GameNode &n)
139143 }
140144}
141145
142- std::list<GameNode> BehaviorSupportProfile::GetMembers (const GameInfoset &p_infoset) const
143- {
144- std::list<GameNode> answer;
145- for (const auto &member : p_infoset->GetMembers ()) {
146- if (m_nonterminalReachable.at (member)) {
147- answer.push_back (member);
148- }
149- }
150- return answer;
151- }
152-
153146// ========================================================================
154147// BehaviorSupportProfile: Sequence form
155148// ========================================================================
0 commit comments