Skip to content

Commit f65e60d

Browse files
committed
Merge branch 'master' into dev_visitor
# Conflicts: # src/games/gametree.h
2 parents f71825e + a63fdab commit f65e60d

254 files changed

Lines changed: 3039 additions & 1673 deletions

File tree

Some content is hidden

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

ChangeLog

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,44 @@
11
# Changelog
22

3-
## [16.5.0] - unreleased
3+
## [16.5.0] - 2026-01-05
4+
5+
### Fixed
6+
- Sequence-form based equilibrium-finding methods returned incorrect output on games with
7+
outcomes at non-terminal nodes. (#654)
48

59
### Added
610
- Implement `IsAbsentMinded()` on information sets (C++) and `Infoset.is_absent_minded` (Python)
711
to detect if an information is absent-minded.
12+
- Tests for EFG Nash solvers -- `enumpoly_solve`, `lp_solve`, `lcp_solve` -- in behavior strategies
13+
- In `pygambit`, `Node` objects now have a read-only property `own_prior_action` and `Infoset` objects
14+
have a read-only property `own_prior_actions` to retrieve the last action or the set of last actions
15+
taken by the player before reaching the node or information set, respectively. (#582)
16+
- In `pygambit`, `Node` objects now have a read-only property `is_strategy_reachable` to determine
17+
if the node is reachable by at least one pure strategy profile. This proves useful for identifying
18+
unreachable parts of the game tree in games with absent-mindedness. (#629)
819

920
### Changed
21+
- Labels for players, outcomes, strategies, and actions are expected to be non-empty and unique within
22+
the relevant scope (games for players and outcomes, players for strategies, and information sets for
23+
actions). `pygambit` now issues a `FutureWarning` if a label is changed that does not conform to these
24+
expectations. There is now an optional flag `normalize_labels` to `read_*` which will automatically
25+
fill in non-confirming sets of labels. In version 16.6 these will be enforced; invalid label sets will
26+
generate an error and files will be normalized automatically on read. (#614)
27+
- Terminology for agent-form calculations on extensive games has been clarified. Mixed behavior profiles
28+
distinguish "agent" regret and liap values from their strategy-based analogs. Methods which compute
29+
using the agent-form - specifically `enumpure_solve` and `liap_solve`, now clarify this by being named
30+
differently in `pygambit`. (#617)
31+
- For clarity, the `stop_after` and `max_depth` arguments to `lcp_solve` are no longer permitted when solving using
32+
the sequence form. These actually had no effect in previous versions. (#671)
1033
- In the graphical interface, removed option to configure information set link drawing; information sets
1134
are always drawn and indicators are always drawn if an information set spans multiple levels.
1235
- In `pygambit`, indexing the children of a node by a string inteprets the string as an action label,
1336
not a label of a child node. In addition, indexing by an action object is now supported. (#587)
1437
- In `pygambit`, `min_payoff` and `max_payoff` (for both games and players) now refers to payoffs in
1538
any play of the game; previously this referred only to the set of outcomes. (#498)
16-
17-
### Added
18-
- Tests for EFG Nash solvers -- `enumpoly_solve`, `lp_solve`, `lcp_solve` -- in behavior stratgegies
19-
- In `pygambit`, `Node` objects now have a read-only property `own_prior_action` and `Infoset` objects
20-
have a read-only property `own_prior_actions` to retrieve the last action or the set of last actions
21-
taken by the player before reaching the node or information set, respectively. (#582)
22-
- In `pygambit`, `Node` objects now have a read-only property `is_strategy_reachable` to determine
23-
if the node is reachable by at least one pure strategy profile. This proves useful for identifying
24-
unreachable parts of the game tree in games with absent-mindedness. (#629)
39+
- In `pygambit`, calls to `sort_infosets` are no longer required to normalise the game representation.
40+
Iteration ordering of information sets and their members is ensured internally. `sort_infosets`
41+
is therefore now a no-op and is deprecated; it will be removed in a future version.
2542

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

Makefile.am

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
##
22
## This file is part of Gambit
3-
## Copyright (c) 1994-2025, The Gambit Project (https://www.gambit-project.org)
3+
## Copyright (c) 1994-2026, The Gambit Project (https://www.gambit-project.org)
44
##
55
## FILE: Makefile.am
66
## Top-level automake input file for Gambit
@@ -249,7 +249,6 @@ core_SOURCES = \
249249
src/core/vector.h \
250250
src/core/recarray.h \
251251
src/core/matrix.h \
252-
src/core/matrix.imp \
253252
src/core/integer.cc \
254253
src/core/integer.h \
255254
src/core/rational.cc \

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/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
# General information about the project.
5151
project = "Gambit"
52-
copyright = "1994-2025, The Gambit Project" # noqa
52+
copyright = "1994-2026, The Gambit Project" # noqa
5353

5454
# The version info for the project you're documenting, acts as replacement for
5555
# |version| and |release|, also used in various other places throughout the

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.convert.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Example invocation for HTML output
4040

4141
$ gambit-convert -O html 2x2.nfg
4242
Convert games among various file formats
43-
Gambit version |release|, Copyright (C) 1994-2025, The Gambit Project
43+
Gambit version |release|, Copyright (C) 1994-2026, The Gambit Project
4444
This is free software, distributed under the GNU GPL
4545

4646
<center><h1>Two person 2 x 2 game with unique mixed equilibrium</h1></center>
@@ -55,7 +55,7 @@ Example invocation for LaTeX output
5555

5656
$ gambit-convert -O sgame 2x2.nfg
5757
Convert games among various file formats
58-
Gambit version |release|, Copyright (C) 1994-2025, The Gambit Project
58+
Gambit version |release|, Copyright (C) 1994-2026, The Gambit Project
5959
This is free software, distributed under the GNU GPL
6060

6161
\begin{game}{2}{2}[Player 1][Player 2]

doc/tools.enummixed.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ in Figure 2 of Selten (International Journal of Game Theory,
7070

7171
$ gambit-enummixed e02.nfg
7272
Compute Nash equilibria by enumerating extreme points
73-
Gambit version |release|, Copyright (C) 1994-2025, The Gambit Project
73+
Gambit version |release|, Copyright (C) 1994-2026, The Gambit Project
7474
This is free software, distributed under the GNU GPL
7575

7676
NE,1,0,0,1,0
@@ -82,7 +82,7 @@ information using the `-c` switch
8282

8383
$ gambit-enummixed -c e02.nfg
8484
Compute Nash equilibria by enumerating extreme points
85-
Gambit version |release|, Copyright (C) 1994-2025, The Gambit Project
85+
Gambit version |release|, Copyright (C) 1994-2026, The Gambit Project
8686
This is free software, distributed under the GNU GPL
8787

8888
NE,1,0,0,1,0

doc/tools.enumpoly.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Computing equilibria of the strategic game :download:`e01.nfg
9898

9999
$ gambit-enumpoly e01.nfg
100100
Compute Nash equilibria by solving polynomial systems
101-
Gambit version |release|, Copyright (C) 1994-2025, The Gambit Project
101+
Gambit version |release|, Copyright (C) 1994-2026, The Gambit Project
102102
This is free software, distributed under the GNU GPL
103103

104104
NE,1.000000,0.000000,1.000000,0.000000,0.000000,1.000000

doc/tools.enumpure.rst

Lines changed: 7 additions & 7 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

@@ -60,7 +60,7 @@ Computing the pure-strategy equilibria of extensive game :download:`e02.efg
6060

6161
Search for Nash equilibria in pure strategies
6262

63-
Gambit version |release|, Copyright (C) 1994-2025, The Gambit Project
63+
Gambit version |release|, Copyright (C) 1994-2026, The Gambit Project
6464

6565
This is free software, distributed under the GNU GPL
6666

@@ -73,7 +73,7 @@ strategies
7373
$ gambit-enumpure -S e02.efg
7474

7575
Search for Nash equilibria in pure strategies
76-
Gambit version |release|, Copyright (C) 1994-2025, The Gambit Project
76+
Gambit version |release|, Copyright (C) 1994-2026, The Gambit Project
7777
This is free software, distributed under the GNU GPL
7878

7979
NE,1,0,0,1,0
@@ -84,7 +84,7 @@ only one information set; therefore the set of solutions is larger
8484

8585
$ gambit-enumpure -A e02.efg
8686
Search for Nash equilibria in pure strategies
87-
Gambit version |release|, Copyright (C) 1994-2025, The Gambit Project
87+
Gambit version |release|, Copyright (C) 1994-2026, The Gambit Project
8888
This is free software, distributed under the GNU GPL
8989

9090
NE,1,0,1,0,1,0

0 commit comments

Comments
 (0)