The TreeGameRep class for extensive forms has built-in generation of the set of reduced normal form strategies. The implementation of this is some of the oldest code in Gambit - variable names can be traced to the implementation circa 1990. The way this is done is tightly coupled into the data structure, and should be refactored.
The programming task proposed is straightforward, but it would be useful for a person taking this on to have a good understanding of the relationship between an extensive form and its reduced strategic form.
Details
The members flag and whichbranch of GameTreeInfosetRep and whichbranch and ptr of GameTreeNodeRep exist solely as scratch fields for the computation of the set of reduced normal form strategies. which are used by GamePlayerRep::MakeReducedStrats. These should be replaced by working data in the form of std::map which map from the infoset or node (as appropriate) to the scratch data.
Overview
The
TreeGameRep
class for extensive forms has built-in generation of the set of reduced normal form strategies. The implementation of this is some of the oldest code in Gambit - variable names can be traced to the implementation circa 1990. The way this is done is tightly coupled into the data structure, and should be refactored.The programming task proposed is straightforward, but it would be useful for a person taking this on to have a good understanding of the relationship between an extensive form and its reduced strategic form.
Details
The members
flag
andwhichbranch
ofGameTreeInfosetRep
andwhichbranch
andptr
ofGameTreeNodeRep
exist solely as scratch fields for the computation of the set of reduced normal form strategies. which are used byGamePlayerRep::MakeReducedStrats
. These should be replaced by working data in the form ofstd::map
which map from the infoset or node (as appropriate) to the scratch data.