Skip to content

Comprehensive tests for GameStructureChangedError#700

Merged
tturocy merged 1 commit intomasterfrom
Comprehensive_tests_for_GameStructureChangedError
Dec 15, 2025
Merged

Comprehensive tests for GameStructureChangedError#700
tturocy merged 1 commit intomasterfrom
Comprehensive_tests_for_GameStructureChangedError

Conversation

@rahulsavani
Copy link
Copy Markdown
Member

No description provided.

@rahulsavani rahulsavani requested a review from tturocy December 15, 2025 08:53
@rahulsavani
Copy link
Copy Markdown
Member Author

Even if there is a call to _check_validity at the start of the implementation of iterators such as mixed_actions and mixed_behaviors the within iterating the iterator function will not raise the error returned by _check_validity. I opted to call next on the iterators in these new tests, which relies on the error raised by the call to __get_item__.

@tturocy tturocy merged commit c9c00d5 into master Dec 15, 2025
28 checks passed
@rahulsavani rahulsavani deleted the Comprehensive_tests_for_GameStructureChangedError branch December 16, 2025 14:27
tturocy added a commit that referenced this pull request Jan 2, 2026
This clarifies and standardises terminology for "standard Nash" versus "(multi)agent Nash".

* What was previously being called `liap_value` and `*_regret` in mixed behaviour profiles is actually the *agent* versions of these concepts.  The functions have been renamed accordingly (prefixed by `agent_`).
* New versions of `liap_value` and `*_regret` are now provided, which compute the standard values of these concepts (currently, by passing to the corresponding mixed strategy profile).
* Two methods, `enumpure` and `liap`, were actually computing agent profiles.  These have been changed to have versions with `agent` in the name.  Other methods on the extensive form do actually compute Nash equilibria, and so they are not changed.

Closes #617

* For mixed behaviors renamed `liap_value` -> `agent_liap_value` and `max_regret` -> `agent_max_regret` in Python

* Rename agent functions in MixedBehaviorProfile

* Separated out `enumpure_agent_solve` function for clarity.

* Add `liap_agent_solve` and remove that functionality from `liap_solve` for expositional clarity.

* Change interface of `gambit-liap` to be more similar to `gambit-enumpure`

* Change GUI behavior to use only strategic for enumpure and liap

* Implement new (correct) max_regret and liap_value on mixed behaviour profiles

* fixed typo: self.__max_regret -> self._max_regret

* tests for max_regret/infoset regret on mixed behavior profiles

* added tests/test_games/myerson_fig_4_2.efg

* Added comprehensive tests for GameStructureChangedError (#700)

* agent_{liap_value,max_regret} added to tests for GameStructureChangedError

* Fix incorrect function called in MixedBehaviorProfile.liap_value

* remove xfail from test for Myerson fig 4.2 agent versus non-agent liap value

* title and comment in tests/test_games/myerson_fig_4_2.efg

* notebook showing agent versus non-agent notions

* missing file

* using liap_solve and enummixed_solv in 04_agent_versus_non_agent_regret.ipynb

* improve 04_agent_versus_non_agent_regret.ipynb

* move to advanced_tutorials/agent_versus_non_agent_regret.ipynb

* fix relative import

* agent -> non-agent max_regret/liap_solve in 03_stripped_down_poker.ipynb

* removed use_strategic from call to logit_solve in 03_stripped_down_poker.ipynb

* Updated ChangeLog.

* fixing up enumpoly tests

* problem cases shown in tests

* test_regrets_tmp

* clearer example of (one) problem

* test demonstrating issue is to do with infoset order

* test demonstrating issue is to do with infoset order

* Previous test failures were due to not calling `.sort_infosets()` prior to analysis.

We are going to remove `.sort_infosets()` separately; for the moment this adjusts the tests to add an explicit call to clear the errors for clarity.

* Tidy up tests now that information set sorting is obsolete.

---------

Co-authored-by: Rahul Savani <rahul.savani@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants