Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Add tests for profile regrets #444

Open
tturocy opened this issue Feb 9, 2024 · 1 comment
Open

ENH: Add tests for profile regrets #444

tturocy opened this issue Feb 9, 2024 · 1 comment
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

Comments

@tturocy
Copy link
Member

tturocy commented Feb 9, 2024

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:

  1. 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 and MixedBehaviorProfile.action_regret, which tests can be used as example starting points.

  2. Testing these functions are internally consistent. strategy_regret/player_regret/max_regret satisfy some simple identities, as do action_regret/infoset_regret/max_regret. These can be independently computed easily in Python and checked.

  3. 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 a maxregret acceptance parameter, the value of `max_regret for any returned mixed profile must be no more than the specified acceptance value.

@tturocy tturocy added 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 labels Feb 9, 2024
@rahulsavani
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants