gambitproject / gambit

Gambit: The package for computation in game theory
http://www.gambit-project.org
GNU General Public License v2.0
408 stars 151 forks source link

MAINT: Refactor implementation of generation of reduced normal form strategies #440

Open tturocy opened 10 months ago

tturocy commented 10 months ago

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 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.

emiliomarquez commented 7 months ago

Is this still open or has this been implemented already? If its still open and not been implemented, I am going to try refactoring it

tturocy commented 7 months ago

At the moment it's not being actively worked on, so feel free to have a go!