Skip to content

Commit b5ab74f

Browse files
tturocyrahulsavani
andauthored
Terminology for agent versus "standard" values in extensive games (#642)
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>
1 parent 4c1c6bf commit b5ab74f

26 files changed

Lines changed: 1578 additions & 278 deletions

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
to detect if an information is absent-minded.
88

99
### Changed
10+
- Terminology for agent-form calculations on extensive games has been clarified. Mixed behavior profiles
11+
distinguish "agent" regret and liap values from their strategy-based analogs. Methods which compute
12+
using the agent-form - specifically `enumpure_solve` and `liap_solve`, now clarify this by being named
13+
differently in `pygambit`. (#617)
1014
- In the graphical interface, removed option to configure information set link drawing; information sets
1115
are always drawn and indicators are always drawn if an information set spans multiple levels.
1216
- In `pygambit`, indexing the children of a node by a string inteprets the string as an action label,

contrib/games/myerson_fig_4_2.efg

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
EFG 2 R "Myerson (1991) Fig 4.2" { "Player 1" "Player 2" }
2+
"An example from Myerson (1991) Fig 4.2 which has an agent Nash equilibrium that is
3+
not a Nash equilibrium"
4+
5+
p "" 1 1 "" { "A1" "B1" } 0
6+
p "" 2 1 "" { "W2" "X2" } 0
7+
p "" 1 2 "" { "Y1" "Z1" } 0
8+
t "" 1 "" { 3, 0 }
9+
t "" 2 "" { 0, 0 }
10+
p "" 1 2 "" { "Y1" "Z1" } 0
11+
t "" 3 "" { 2, 3 }
12+
t "" 4 "" { 4, 1 }
13+
p "" 2 1 "" { "W2" "X2" } 0
14+
t "" 5 "" { 2, 3 }
15+
t "" 6 "" { 3, 2 }

doc/pygambit.api.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ Probability distributions over behavior
258258
MixedBehaviorProfile.infoset_prob
259259
MixedBehaviorProfile.belief
260260
MixedBehaviorProfile.is_defined_at
261+
MixedBehaviorProfile.agent_max_regret
262+
MixedBehaviorProfile.agent_liap_value
261263
MixedBehaviorProfile.max_regret
262264
MixedBehaviorProfile.liap_value
263265
MixedBehaviorProfile.as_strategy
@@ -297,11 +299,13 @@ Computation of Nash equilibria
297299

298300
NashComputationResult
299301
enumpure_solve
302+
enumpure_agent_solve
300303
enummixed_solve
301304
enumpoly_solve
302305
lp_solve
303306
lcp_solve
304307
liap_solve
308+
liap_agent_solve
305309
logit_solve
306310
simpdiv_solve
307311
ipa_solve

doc/tools.enumpure.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ pure-strategy Nash equilibria.
3838

3939
.. versionadded:: 14.0.2
4040

41-
Report agent form equilibria, that is, equilibria which consider
42-
only deviations at one information set. Only has an effect for
43-
extensive games, as strategic games have only one information set
44-
per player.
41+
Report agent Nash equilibria, that is, equilibria which consider
42+
only deviations at a single information set at a time. Only has
43+
an effect for extensive games, as strategic games have only
44+
one information set per player.
4545

4646
.. cmdoption:: -h
4747

doc/tools.liap.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,24 @@ not guaranteed to find all, or even any, Nash equilibria.
2626
in terms of the maximum regret. This regret is interpreted as a fraction
2727
of the difference between the maximum and minimum payoffs in the game.
2828

29+
.. versionchanged:: 16.5.0
30+
31+
The `-A` switch has been introduced to be explicit in choosing to compute
32+
agent Nash equilibria. The default is now to compute using the strategic
33+
form even for extensive games.
34+
35+
2936
.. program:: gambit-liap
3037

38+
.. cmdoption:: -A
39+
40+
.. versionadded:: 16.5.0
41+
42+
Report agent Nash equilibria, that is, equilibria which consider
43+
only deviations at a single information set at a time. Only has
44+
an effect for extensive games, as strategic games have only
45+
one information set per player.
46+
3147
.. cmdoption:: -d
3248

3349
Express all output using decimal representations with the

0 commit comments

Comments
 (0)