HP tests - #1007
Conversation
…ect#970) * docs: update README.md * docs: update .all-contributorsrc --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
) Fixes a segfault in the AGG/BAGG file readers on malformed input. Malformed input (e.g. an `.nfg` to `read_bagg`, or a degenerate `"0 0 0"` header) slipped past the header checks and dereferenced an empty vector in the AGG constructor, segfaulting. The parser code is unchanged from `master` and runs before any label normalization. This validates header fields before construction; malformed headers now raise `ValueError`, valid files are unaffected. Tests added: `test_read_agg_zero_header` / `test_read_bagg_zero_header` read `"0 0 0\n"` and expect `ValueError`. These segfault on unpatched code (taking down the `pytest` process, as in CI) rather than failing as an assertion.
* Added 3 player max cut test for enumpoly strategic form * added strategic game tests for enumpoly strategic form: 3x3 coordination game, 3-player unique Nash (nau2004 sec4), 2x2x2 3 pure Nash (nau2004 sec5)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…for players and strategies (gambitproject#965) Make NormalizeGameLabels run unconditionally in every reader and remove the normalize_labels / p_normalizeLabels parameter throughout the read path: ReadEfgFile, ReadNfgFile, ReadGbtFile, ReadAggFile, ReadBaggFile, ReadGame, and the pygambit read_* wrappers.
This fixes editing of GUI player labels to work more like expected: * ESC cancels edits * TAB also commits edits * Losing focus commits edits
…t#985) `build_support/catalog/update.py` was not building a fresh catalog from Git directly. Instead, it was calling `gbt.catalog.games(include_descriptions=True)`, so it was using whatever `pygambit` the Python environment is importing. If that had an old installed/editable `pygambit`, or an old `build/lib.../pygambit/catalog_data`, it would “remember” deleted games.
…olve` docstring (gambitproject#986) Closes gambitproject#984.
This implements a variety of UX improvements for editing of labels in the GUI, especially taking into account our new rules about what constitutes a valid label, for which objects labels are required, and the requirements for labels being unique (within appropriate scope). Closes gambitproject#945.
…ject#993) This refactors and improves the control of long-running external processes. * Clarifies the difference between the monitor dialog and the actual controller of the external process * Makes the handling of the external process more robust * Moves parsing of external process output into the process handler rather than the analysis output. This is preparatory work which will enable the ability to run long-running processes as threads.
) This implements a minimal, pseudo-XML parser targeted specifically at the de-facto file format written as the "Gambit workspace" .gbt file format. All reading and writing is consolidated with a data interface model that does not depend on wxWidgets. This allows the removal of tinyxml as a dependency being carried around in the source. Closes gambitproject#897.
This does some housekeeping in the LCP solvers: * To be consistent with other methods, exceptions are not caught in the solver but allowed to propagate out. * Instead of using exceptions to escape the `AllLemke` recursion, a return type is used.
…her than waiting until the end of the run. (gambitproject#998)
…1000) This standardises the structure of callbacks for Nash equilibrium methods: * All methods call an "on equilibrium" callback, immediately upon identifying a profile as an equilibrium (to within given tolerances as appropriate) * Methods for which progress updates are meaningful/useful define one or more event types, which are emitted (via a callback) when they occur. These are method-specific. Closes gambitproject#340 - as this now standardises to the extent sensible calling conventions across all methods.
…ameters in the graphical interface (gambitproject#1001)
…with a strategy (gambitproject#1003) Co-authored-by: drdkad <d.a.kadnikov@gmail.com>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6 to 7. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v6...v7) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
This PR has become a little chaotic since I wanted to use the new added games from the catalog which were not in feature/hp yet. Furthermore, now As well as that, I have also tested every game with a unique best response (this has been computed by the algorithm since we have already checked that it works as expected) from |
Description of the changes in this PR
This PR adds five new tests to our test suite.
The games tested have been selected from the catalog, using
enumpoly_solveto choose the ones with a single Nash equilibrium.The expected result is the equilibrium computed by the
enumpolysolver.The new games used are:
-
books/myerson1991/fig2_1.efg-
books/vonstengel2022/fig10.1.efg-
journals/ijgt/nau2004/sec4.nfg-
journals/other/reiley2008/fig1.efg-
journals/ijgt/selten1975/fig2which has a degenerate prior (player 1 can choose three strategies with payoff = 1 whent=0).They all pass the test!
How to review this PR
Executing
pytestand checking that the expected results are actually the NE of these games.