Skip to content

Commit 3d006a0

Browse files
committed
Merge branch 'master' into update_old_lp_lcp
2 parents 068a98e + 55c3ecd commit 3d006a0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2095
-500
lines changed

.github/workflows/tools.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,6 @@ jobs:
3333
sudo make install
3434
3535
macos:
36-
runs-on: macos-14
37-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
38-
steps:
39-
- uses: actions/checkout@v6
40-
- name: Install dependencies
41-
run: brew install automake autoconf wxwidgets
42-
- run: aclocal
43-
- run: automake --add-missing
44-
- run: autoconf
45-
- run: ./configure
46-
- run: make
47-
- run: sudo make install
48-
- run: make osx-dmg
49-
- uses: actions/upload-artifact@v6
50-
with:
51-
name: artifact-osx-14
52-
path: "*.dmg"
53-
54-
macos-14:
5536
runs-on: macos-15
5637
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
5738
steps:
@@ -63,12 +44,6 @@ jobs:
6344
- run: autoconf
6445
- run: ./configure
6546
- run: make
66-
- run: sudo make install
67-
- run: make osx-dmg
68-
- uses: actions/upload-artifact@v6
69-
with:
70-
name: artifact-osx-15
71-
path: "*.dmg"
7247

7348
windows:
7449
runs-on: windows-latest

ChangeLog

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,25 @@
1717
unreachable parts of the game tree in games with absent-mindedness. (#629)
1818

1919
### Changed
20+
- Labels for players, outcomes, strategies, and actions are expected to be non-empty and unique within
21+
the relevant scope (games for players and outcomes, players for strategies, and information sets for
22+
actions). `pygambit` now issues a `FutureWarning` if a label is changed that does not conform to these
23+
expectations. There is now an optional flag `normalize_labels` to `read_*` which will automatically
24+
fill in non-confirming sets of labels. In version 16.6 these will be enforced; invalid label sets will
25+
generate an error and files will be normalized automatically on read. (#614)
26+
- Terminology for agent-form calculations on extensive games has been clarified. Mixed behavior profiles
27+
distinguish "agent" regret and liap values from their strategy-based analogs. Methods which compute
28+
using the agent-form - specifically `enumpure_solve` and `liap_solve`, now clarify this by being named
29+
differently in `pygambit`. (#617)
2030
- In the graphical interface, removed option to configure information set link drawing; information sets
2131
are always drawn and indicators are always drawn if an information set spans multiple levels.
2232
- In `pygambit`, indexing the children of a node by a string inteprets the string as an action label,
2333
not a label of a child node. In addition, indexing by an action object is now supported. (#587)
2434
- In `pygambit`, `min_payoff` and `max_payoff` (for both games and players) now refers to payoffs in
2535
any play of the game; previously this referred only to the set of outcomes. (#498)
36+
- In `pygambit`, calls to `sort_infosets` are no longer required to normalise the game representation.
37+
Iteration ordering of information sets and their members is ensured internally. `sort_infosets`
38+
is therefore now a no-op and is deprecated; it will be removed in a future version.
2639

2740
### Removed
2841
- Eliminating dominated actions has been removed from the GUI as it was implementing a non-standard

build_support/GAMBIT_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.4.0
1+
16.5.0

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/formats.efg.rst

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,13 @@ The extensive game (.efg) file format
66
The extensive game (.efg) file format has been used by Gambit, with
77
minor variations, to represent extensive games since circa 1994. It
88
replaced an earlier format, which had no particular name but which had
9-
the conventional extension .dt1. It is intended that some new formats
10-
will be introduced in the future; however, this format will be
11-
supported by Gambit, possibly through the use of converter programs to
12-
those putative future formats, for the foreseeable future.
9+
the conventional extension .dt1.
1310

1411

1512
A sample file
1613
-------------
1714

18-
This is a sample file illustrating the general format of the file.
19-
This file is similar to the one distributed in the Gambit distribution
20-
under the name bayes1a.efg::
15+
This is a sample file illustrating the general format of the file::
2116

2217
EFG 2 R "General Bayes game, one stage" { "Player 1" "Player 2" }
2318
c "ROOT" 1 "(0,1)" { "1G" 0.500000 "1B" 0.500000 } 0
@@ -53,8 +48,6 @@ under the name bayes1a.efg::
5348
t "" 16 "Outcome 16" { 10.000000 0.000000 }
5449

5550

56-
57-
5851
Structure of the prologue
5952
-------------------------
6053

@@ -97,11 +90,9 @@ of one line per node.
9790
Each node entry begins with an unquoted character indicating the type
9891
of the node. There are three node types:
9992

100-
101-
102-
+ c for a chance node
103-
+ p for a personal player node
104-
+ t for a terminal node
93+
+ `c` for a chance node
94+
+ `p` for a personal player node
95+
+ `t` for a terminal node
10596

10697
Each node type will be discussed individually below. There are three
10798
numbering conventions which are used to identify the information
@@ -116,19 +107,21 @@ integer may be used to specify information sets for different players;
116107
this is not ambiguous since the player number appears as well.
117108
Finally, outcomes are also arbitrarily numbered in the file format in
118109
the same way in which information sets are, except for the special
119-
number 0 which indicates the null outcome.
110+
number 0 which is reserved to indicate the null outcome.
111+
Outcome 0 must not have a name or payoffs specified.
120112

121113
Information sets and outcomes may (and frequently will) appear
122114
multiple times within a game. By convention, the second and subsequent
123115
times an information set or outcome appears, the file may omit the
124116
descriptive information for that information set or outcome.
125117
Alternatively, the file may specify the descriptive information again;
126118
however, it must precisely match the original declaration of the
127-
information set or outcome. If any part of the description is omitted,
128-
the whole description must be omitted.
119+
information set or outcome. Any mismatch in repeated declarations
120+
is an error, and the file is not valid.
121+
If any part of the description is omitted, the whole description must be omitted.
129122

130123
Outcomes may appear at nonterminal nodes. In these cases, payoffs are
131-
interepreted as incremental payoffs; the payoff to a player for a
124+
interpreted as incremental payoffs; the payoff to a player for a
132125
given path through the tree is interpreted as the sum of the payoffs
133126
at the outcomes encountered on that path (including at the terminal
134127
node). This is ideal for the representation of games with well-
@@ -146,41 +139,28 @@ with the character c . Following this, in order, are
146139

147140
+ a text string, giving the name of the node
148141
+ a positive integer specifying the information set number
149-
+ (optional) the name of the information set
150-
+ (optional) a list of actions at the information set with their
142+
+ (optional) the name of the information set and a list of actions at the information set with their
151143
corresponding probabilities
152144
+ a nonnegative integer specifying the outcome
153-
+ (optional)the payoffs to each player for the outcome
154-
155-
145+
+ (optional) the name of the outcome and the payoffs to each player for the outcome
156146

157147
**Format of personal (player) nodes.** Entries for personal player
158148
decision nodes begin with the character p . Following this, in order,
159149
are:
160150

161-
162-
163151
+ a text string, giving the name of the node
164152
+ a positive integer specifying the player who owns the node
165153
+ a positive integer specifying the information set
166-
+ (optional) the name of the information set
167-
+ (optional) a list of action names for the information set
154+
+ (optional) the name of the information set and a list of action names for the information set
168155
+ a nonnegative integer specifying the outcome
169-
+ (optional) the name of the outcome
170-
+ the payoffs to each player for the outcome
171-
156+
+ (optional) the name of the outcome and the payoffs to each player for the outcome
172157

173158

174159
**Format of terminal nodes.** Entries for terminal nodes begin with
175160
the character t . Following this, in order, are:
176161

177-
178-
179162
+ a text string, giving the name of the node
180163
+ a nonnegative integer specifying the outcome
181-
+ (optional) the name of the outcome
182-
+ the payoffs to each player for the outcome
183-
184-
164+
+ (optional) the name of the outcome and the payoffs to each player for the outcome
185165

186166
There is no explicit end-of-file delimiter for the file.

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)