noregret 0.0.0.dev0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- noregret-0.0.0.dev0/LICENSE +21 -0
- noregret-0.0.0.dev0/PKG-INFO +106 -0
- noregret-0.0.0.dev0/README.md +61 -0
- noregret-0.0.0.dev0/noregret/__init__.py +0 -0
- noregret-0.0.0.dev0/noregret/games.py +632 -0
- noregret-0.0.0.dev0/noregret/regret_minimizers.py +645 -0
- noregret-0.0.0.dev0/noregret/utilities.py +308 -0
- noregret-0.0.0.dev0/noregret.egg-info/PKG-INFO +106 -0
- noregret-0.0.0.dev0/noregret.egg-info/SOURCES.txt +12 -0
- noregret-0.0.0.dev0/noregret.egg-info/dependency_links.txt +1 -0
- noregret-0.0.0.dev0/noregret.egg-info/requires.txt +3 -0
- noregret-0.0.0.dev0/noregret.egg-info/top_level.txt +1 -0
- noregret-0.0.0.dev0/setup.cfg +4 -0
- noregret-0.0.0.dev0/setup.py +52 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Universal, Open, Free, and Transparent Computer Poker Research Group
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: noregret
|
|
3
|
+
Version: 0.0.0.dev0
|
|
4
|
+
Summary: No-regret learning dynamics
|
|
5
|
+
Home-page: https://github.com/uoftcprg/noregret
|
|
6
|
+
Author: Universal, Open, Free, and Transparent Computer Poker Research Group
|
|
7
|
+
Author-email: juhok@cs.cmu.edu
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Documentation, https://noregret.readthedocs.io/en/latest/
|
|
10
|
+
Project-URL: Source, https://github.com/uoftcprg/noregret
|
|
11
|
+
Project-URL: Tracker, https://github.com/uoftcprg/noregret/issues
|
|
12
|
+
Keywords: artificial-intelligence,game,game-theory,imperfect-information-game,online-learning,python
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Education
|
|
15
|
+
Classifier: Topic :: Education
|
|
16
|
+
Classifier: Topic :: Scientific/Engineering
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
Classifier: Programming Language :: Python
|
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
|
22
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Requires-Python: >=3.11
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Requires-Dist: numpy<3,>=2.3.3
|
|
30
|
+
Requires-Dist: ordered-set<5,>=4.1.0
|
|
31
|
+
Requires-Dist: scipy<2,>=1.16.1
|
|
32
|
+
Dynamic: author
|
|
33
|
+
Dynamic: author-email
|
|
34
|
+
Dynamic: classifier
|
|
35
|
+
Dynamic: description
|
|
36
|
+
Dynamic: description-content-type
|
|
37
|
+
Dynamic: home-page
|
|
38
|
+
Dynamic: keywords
|
|
39
|
+
Dynamic: license
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
Dynamic: project-url
|
|
42
|
+
Dynamic: requires-dist
|
|
43
|
+
Dynamic: requires-python
|
|
44
|
+
Dynamic: summary
|
|
45
|
+
|
|
46
|
+
# noregret
|
|
47
|
+
|
|
48
|
+
No-regret learning dynamics
|
|
49
|
+
|
|
50
|
+
## Scripts
|
|
51
|
+
|
|
52
|
+
Replicate the experiment of [Leme, Piliouras, and Schneider (2025)](https://proceedings.neurips.cc/paper_files/paper/2024/file/8b9062635eafbc3677429496a23e424b-Paper-Conference.pdf).
|
|
53
|
+
|
|
54
|
+
```console
|
|
55
|
+
python scripts/leme-piliouras-schneider/main.py
|
|
56
|
+
python scripts/leme-piliouras-schneider/main2.py
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Solve a problem in HW2 of [CMU CSD's 15-888 (2025)](https://www.cs.cmu.edu/~sandholm/cs15-888F25/).
|
|
60
|
+
|
|
61
|
+
```console
|
|
62
|
+
python scripts/15-888/from-15-888.py < path/to/15-888/hw2/cfr_files/rock_paper_superscissors.json > games/extensive-form/15-888/rock-paper-superscissors.json
|
|
63
|
+
python scripts/15-888/from-15-888.py < path/to/15-888/hw2/cfr_files/kuhn_poker.json > games/extensive-form/15-888/kuhn-poker.json
|
|
64
|
+
python scripts/15-888/from-15-888.py < path/to/15-888/hw2/cfr_files/leduc_poker.json > games/extensive-form/15-888/leduc-poker.json
|
|
65
|
+
|
|
66
|
+
python scripts/extensive-form-game-statistics.py \
|
|
67
|
+
rock_paper_superscissors games/extensive-form/15-888/rock-paper-superscissors.json \
|
|
68
|
+
kuhn_poker games/extensive-form/15-888/kuhn-poker.json \
|
|
69
|
+
leduc_poker games/extensive-form/15-888/leduc-poker.json \
|
|
70
|
+
> games/extensive-form/15-888/statistics.csv
|
|
71
|
+
|
|
72
|
+
python scripts/15-888/hw2/main.py
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Run the BM-CFR experiment.
|
|
76
|
+
|
|
77
|
+
```console
|
|
78
|
+
python scripts/from-open-spiel.py kuhn_poker | python scripts/compress-extensive-form-game.py > games/extensive-form/open-spiel/kuhn-poker.json
|
|
79
|
+
python scripts/from-open-spiel.py leduc_poker | python scripts/compress-extensive-form-game.py > games/extensive-form/open-spiel/leduc-poker.json
|
|
80
|
+
python scripts/from-open-spiel.py liars_dice | python scripts/compress-extensive-form-game.py > games/extensive-form/open-spiel/liars-dice.json
|
|
81
|
+
python scripts/from-open-spiel.py first_sealed_auction | python scripts/compress-extensive-form-game.py > games/extensive-form/open-spiel/first-sealed-auction.json
|
|
82
|
+
python scripts/from-open-spiel.py sheriff | python scripts/compress-extensive-form-game.py > games/extensive-form/open-spiel/sheriff.json
|
|
83
|
+
python scripts/from-open-spiel.py tiny_bridge_2p | python scripts/compress-extensive-form-game.py > games/extensive-form/open-spiel/2p-tiny-bridge.json
|
|
84
|
+
python scripts/from-open-spiel.py tiny_hanabi | python scripts/compress-extensive-form-game.py > games/extensive-form/open-spiel/tiny-hanabi.json
|
|
85
|
+
|
|
86
|
+
python scripts/extensive-form-game-statistics.py \
|
|
87
|
+
kuhn_poker games/extensive-form/open-spiel/kuhn-poker.json \
|
|
88
|
+
leduc_poker games/extensive-form/open-spiel/leduc-poker.json \
|
|
89
|
+
liars_dice games/extensive-form/open-spiel/liars-dice.json \
|
|
90
|
+
first_sealed_auction games/extensive-form/open-spiel/first-sealed-auction.json \
|
|
91
|
+
sheriff games/extensive-form/open-spiel/sheriff.json \
|
|
92
|
+
tiny_bridge_2p games/extensive-form/open-spiel/2p-tiny-bridge.json \
|
|
93
|
+
tiny_hanabi games/extensive-form/open-spiel/tiny-hanabi.json \
|
|
94
|
+
> games/extensive-form/open-spiel/statistics.csv
|
|
95
|
+
|
|
96
|
+
python scripts/counterfactual-swap-regret-minimization/main.py > scripts/counterfactual-swap-regret-minimization/average-strategies.jsonl
|
|
97
|
+
python scripts/counterfactual-swap-regret-minimization/main2.py < scripts/counterfactual-swap-regret-minimization/average-strategies.jsonl
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Run the symmetrized game experiment.
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
python scripts/symmetrized-game/main.py
|
|
104
|
+
python scripts/symmetrized-game/main2.py
|
|
105
|
+
python scripts/symmetrized-game/main3.py
|
|
106
|
+
```
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# noregret
|
|
2
|
+
|
|
3
|
+
No-regret learning dynamics
|
|
4
|
+
|
|
5
|
+
## Scripts
|
|
6
|
+
|
|
7
|
+
Replicate the experiment of [Leme, Piliouras, and Schneider (2025)](https://proceedings.neurips.cc/paper_files/paper/2024/file/8b9062635eafbc3677429496a23e424b-Paper-Conference.pdf).
|
|
8
|
+
|
|
9
|
+
```console
|
|
10
|
+
python scripts/leme-piliouras-schneider/main.py
|
|
11
|
+
python scripts/leme-piliouras-schneider/main2.py
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Solve a problem in HW2 of [CMU CSD's 15-888 (2025)](https://www.cs.cmu.edu/~sandholm/cs15-888F25/).
|
|
15
|
+
|
|
16
|
+
```console
|
|
17
|
+
python scripts/15-888/from-15-888.py < path/to/15-888/hw2/cfr_files/rock_paper_superscissors.json > games/extensive-form/15-888/rock-paper-superscissors.json
|
|
18
|
+
python scripts/15-888/from-15-888.py < path/to/15-888/hw2/cfr_files/kuhn_poker.json > games/extensive-form/15-888/kuhn-poker.json
|
|
19
|
+
python scripts/15-888/from-15-888.py < path/to/15-888/hw2/cfr_files/leduc_poker.json > games/extensive-form/15-888/leduc-poker.json
|
|
20
|
+
|
|
21
|
+
python scripts/extensive-form-game-statistics.py \
|
|
22
|
+
rock_paper_superscissors games/extensive-form/15-888/rock-paper-superscissors.json \
|
|
23
|
+
kuhn_poker games/extensive-form/15-888/kuhn-poker.json \
|
|
24
|
+
leduc_poker games/extensive-form/15-888/leduc-poker.json \
|
|
25
|
+
> games/extensive-form/15-888/statistics.csv
|
|
26
|
+
|
|
27
|
+
python scripts/15-888/hw2/main.py
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Run the BM-CFR experiment.
|
|
31
|
+
|
|
32
|
+
```console
|
|
33
|
+
python scripts/from-open-spiel.py kuhn_poker | python scripts/compress-extensive-form-game.py > games/extensive-form/open-spiel/kuhn-poker.json
|
|
34
|
+
python scripts/from-open-spiel.py leduc_poker | python scripts/compress-extensive-form-game.py > games/extensive-form/open-spiel/leduc-poker.json
|
|
35
|
+
python scripts/from-open-spiel.py liars_dice | python scripts/compress-extensive-form-game.py > games/extensive-form/open-spiel/liars-dice.json
|
|
36
|
+
python scripts/from-open-spiel.py first_sealed_auction | python scripts/compress-extensive-form-game.py > games/extensive-form/open-spiel/first-sealed-auction.json
|
|
37
|
+
python scripts/from-open-spiel.py sheriff | python scripts/compress-extensive-form-game.py > games/extensive-form/open-spiel/sheriff.json
|
|
38
|
+
python scripts/from-open-spiel.py tiny_bridge_2p | python scripts/compress-extensive-form-game.py > games/extensive-form/open-spiel/2p-tiny-bridge.json
|
|
39
|
+
python scripts/from-open-spiel.py tiny_hanabi | python scripts/compress-extensive-form-game.py > games/extensive-form/open-spiel/tiny-hanabi.json
|
|
40
|
+
|
|
41
|
+
python scripts/extensive-form-game-statistics.py \
|
|
42
|
+
kuhn_poker games/extensive-form/open-spiel/kuhn-poker.json \
|
|
43
|
+
leduc_poker games/extensive-form/open-spiel/leduc-poker.json \
|
|
44
|
+
liars_dice games/extensive-form/open-spiel/liars-dice.json \
|
|
45
|
+
first_sealed_auction games/extensive-form/open-spiel/first-sealed-auction.json \
|
|
46
|
+
sheriff games/extensive-form/open-spiel/sheriff.json \
|
|
47
|
+
tiny_bridge_2p games/extensive-form/open-spiel/2p-tiny-bridge.json \
|
|
48
|
+
tiny_hanabi games/extensive-form/open-spiel/tiny-hanabi.json \
|
|
49
|
+
> games/extensive-form/open-spiel/statistics.csv
|
|
50
|
+
|
|
51
|
+
python scripts/counterfactual-swap-regret-minimization/main.py > scripts/counterfactual-swap-regret-minimization/average-strategies.jsonl
|
|
52
|
+
python scripts/counterfactual-swap-regret-minimization/main2.py < scripts/counterfactual-swap-regret-minimization/average-strategies.jsonl
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Run the symmetrized game experiment.
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
python scripts/symmetrized-game/main.py
|
|
59
|
+
python scripts/symmetrized-game/main2.py
|
|
60
|
+
python scripts/symmetrized-game/main3.py
|
|
61
|
+
```
|
|
File without changes
|