gambit
gambit copied to clipboard
ENH: Add function returning whether an information set is absent-minded
Absent-mindedness occurs when a player, moving along a single path of play, can re-enter an information set visited previously. Detecting this property is valuable for users to:
- Better understand the structure of their game.
- Be warned if using certain concepts and solution algorithms that are incompatible with absent-mindedness.
The existing GameTreeRep::BuildInfosetParents() method already contains the necessary traversal logic to detect this condition.
- Add a new data member to
GameTreeRep:std::set<GameInfoset> m_absentMindedInfosets; - Augment the existing
BuildInfosetParents()traversal to populatem_absentMindedInfosetsthat tracks all absent-minded information sets. - A new public method,
IsAbsentMinded() const, will mirror the logic ofIsPerfectRecall(): it will trigger the traversal if needed and then check the state of the new container.