ENH: Add tests for profile regrets
We are not yet testing these functions directly in pygambit:
-
MixedStrategyProfile.player_regret -
MixedStrategyProfile.max_regret -
MixedBehaviorProfile.infoset_regret -
MixedBehaviorProfile.max_regret
There are three kinds of tests that can and should be written:
-
Testing that these functions take on expected values in known cases. We call these "reference" tests, and they exist already in the test suite for
MixedStrategyProfile.strategy_regretandMixedBehaviorProfile.action_regret, which tests can be used as example starting points. -
Testing these functions are internally consistent.
strategy_regret/player_regret/max_regretsatisfy some simple identities, as doaction_regret/infoset_regret/max_regret. These can be independently computed easily in Python and checked. -
In the tests so far for the Nash equilibrium computation methods, we do not check for Nash-ness of the output.
max_regretcan be added to these tests. In particular, for Nash algorithms that take amaxregretacceptance parameter, the value of `max_regret for any returned mixed profile must be no more than the specified acceptance value.
With regard to Ted's point 1: There are lots of examples of reference tests for liap_value, which is 0 if and only if the corresponding profile is a Nash equilibrium, that use Nash equilibria and test for the Liapanov value being 0. Any such example can be used as a reference test for max regret and player regret (for all players) being zero.
hey @tturocy can you assign this issue to me... i am working on it