ENH: Add tests for profile regrets #444
Labels
good-first-issue
Items which are (relatively) straightforward, and good ways to get into the code
python
Items which involve coding in Python
tests
Items which involve the pygambit test suite
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_regret
andMixedBehaviorProfile.action_regret
, which tests can be used as example starting points.Testing these functions are internally consistent.
strategy_regret
/player_regret
/max_regret
satisfy 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_regret
can be added to these tests. In particular, for Nash algorithms that take amaxregret
acceptance parameter, the value of `max_regret for any returned mixed profile must be no more than the specified acceptance value.The text was updated successfully, but these errors were encountered: