PyDiffGame 2.0.0__py3-none-any.whl → 2.0.1__py3-none-any.whl
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.
- PyDiffGame/__init__.py +1 -1
- {pydiffgame-2.0.0.dist-info → pydiffgame-2.0.1.dist-info}/METADATA +29 -16
- {pydiffgame-2.0.0.dist-info → pydiffgame-2.0.1.dist-info}/RECORD +5 -5
- {pydiffgame-2.0.0.dist-info → pydiffgame-2.0.1.dist-info}/WHEEL +0 -0
- {pydiffgame-2.0.0.dist-info → pydiffgame-2.0.1.dist-info}/licenses/LICENSE +0 -0
PyDiffGame/__init__.py
CHANGED
|
@@ -34,7 +34,7 @@ from PyDiffGame.discrete import DiscretePyDiffGame
|
|
|
34
34
|
from PyDiffGame.lqr import ContinuousLQR, DiscreteLQR
|
|
35
35
|
from PyDiffGame.objective import GameObjective, LQRObjective, Objective
|
|
36
36
|
|
|
37
|
-
__version__ = "2.0.
|
|
37
|
+
__version__ = "2.0.1"
|
|
38
38
|
|
|
39
39
|
__all__ = [
|
|
40
40
|
"PyDiffGame",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyDiffGame
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.1
|
|
4
4
|
Summary: Nash-equilibrium solutions to linear-quadratic differential games, via a reduction of the Game Hamilton-Jacobi-Bellman equations to coupled algebraic and differential Riccati equations for multi-objective dynamical control systems.
|
|
5
5
|
Project-URL: Homepage, https://krichelj.github.io/PyDiffGame/
|
|
6
6
|
Project-URL: Repository, https://github.com/krichelj/PyDiffGame
|
|
@@ -58,7 +58,7 @@ Requires-Dist: control>=0.10; extra == 'examples'
|
|
|
58
58
|
Description-Content-Type: text/markdown
|
|
59
59
|
|
|
60
60
|
<p align="center">
|
|
61
|
-
<img alt="PyDiffGame logo" src="images/logo.png" width="420"/>
|
|
61
|
+
<img alt="PyDiffGame logo" src="https://raw.githubusercontent.com/krichelj/PyDiffGame/master/images/logo.png" width="420"/>
|
|
62
62
|
</p>
|
|
63
63
|
|
|
64
64
|
<p align="center">
|
|
@@ -127,22 +127,32 @@ accounting on a common yardstick, and ready-made plotting.
|
|
|
127
127
|
|
|
128
128
|
# Installation
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
PyDiffGame is published on [PyPI](https://pypi.org/project/PyDiffGame/) and is
|
|
131
|
+
managed with [**uv**](https://docs.astral.sh/uv/). Add it to your project:
|
|
131
132
|
|
|
132
133
|
```bash
|
|
133
|
-
|
|
134
|
+
uv add PyDiffGame
|
|
134
135
|
```
|
|
135
136
|
|
|
136
137
|
To run the bundled examples (which additionally need
|
|
137
138
|
[`python-control`](https://python-control.readthedocs.io/)):
|
|
138
139
|
|
|
139
140
|
```bash
|
|
140
|
-
|
|
141
|
+
uv add "PyDiffGame[examples]"
|
|
141
142
|
```
|
|
142
143
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
<details>
|
|
145
|
+
<summary><b>Prefer pip?</b> It works as a fallback.</summary>
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
pip install PyDiffGame
|
|
149
|
+
pip install "PyDiffGame[examples]" # with the examples extra
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
</details>
|
|
153
|
+
|
|
154
|
+
To work on the package itself, clone it and sync the locked development
|
|
155
|
+
environment with uv:
|
|
146
156
|
|
|
147
157
|
```bash
|
|
148
158
|
git clone https://github.com/krichelj/PyDiffGame.git
|
|
@@ -151,7 +161,10 @@ uv sync --extra dev # creates .venv with the exact locked dependencies
|
|
|
151
161
|
uv run pre-commit install # enable the formatting / lint / type-check hooks
|
|
152
162
|
```
|
|
153
163
|
|
|
154
|
-
Then run anything through `uv run` (`uv run pytest`,
|
|
164
|
+
Then run anything through `uv run` (`uv run pytest`,
|
|
165
|
+
`uv run python -m PyDiffGame.examples.MassesWithSpringsComparison`, …). Pip users
|
|
166
|
+
can instead `pip install -e ".[dev]"`, though uv is recommended for the exact
|
|
167
|
+
locked environment.
|
|
155
168
|
|
|
156
169
|
# Quick start
|
|
157
170
|
|
|
@@ -242,7 +255,7 @@ To show the package in action we compare a differential game against an LQR on a
|
|
|
242
255
|
masses connected by springs — a textbook coupled, oscillatory system:
|
|
243
256
|
|
|
244
257
|
<p align="center">
|
|
245
|
-
<img alt="Two masses connected by springs between two walls" src="images/readme/masses_schematic.png" width="760"/>
|
|
258
|
+
<img alt="Two masses connected by springs between two walls" src="https://raw.githubusercontent.com/krichelj/PyDiffGame/master/images/readme/masses_schematic.png" width="760"/>
|
|
246
259
|
</p>
|
|
247
260
|
|
|
248
261
|
The physical input space is decomposed along the **modal** directions of $M^{-1}K$, so each
|
|
@@ -304,11 +317,11 @@ monolithic optimum **to numerical precision**: the two state trajectories coinci
|
|
|
304
317
|
(they differ by ~10⁻⁷) and the costs are equal:
|
|
305
318
|
|
|
306
319
|
<p align="center">
|
|
307
|
-
<img alt="State trajectories: the decomposed game reproduces the monolithic LQR" src="images/readme/masses_game_vs_lqr.png" width="860"/>
|
|
320
|
+
<img alt="State trajectories: the decomposed game reproduces the monolithic LQR" src="https://raw.githubusercontent.com/krichelj/PyDiffGame/master/images/readme/masses_game_vs_lqr.png" width="860"/>
|
|
308
321
|
</p>
|
|
309
322
|
|
|
310
323
|
<p align="center">
|
|
311
|
-
<img alt="Cost comparison: the modal game recovers the LQR optimum" src="images/readme/masses_cost.png" width="440"/>
|
|
324
|
+
<img alt="Cost comparison: the modal game recovers the LQR optimum" src="https://raw.githubusercontent.com/krichelj/PyDiffGame/master/images/readme/masses_cost.png" width="440"/>
|
|
312
325
|
</p>
|
|
313
326
|
|
|
314
327
|
For this modally-decoupled system the decomposition is **lossless** — and it buys
|
|
@@ -316,7 +329,7 @@ For this modally-decoupled system the decomposition is **lossless** — and it b
|
|
|
316
329
|
player, without re-tuning one monolithic cost matrix.
|
|
317
330
|
|
|
318
331
|
> The figures above are regenerated from the live solver by
|
|
319
|
-
> [`tools/generate_readme_figures.py`](tools/generate_readme_figures.py)
|
|
332
|
+
> [`tools/generate_readme_figures.py`](https://github.com/krichelj/PyDiffGame/blob/master/tools/generate_readme_figures.py)
|
|
320
333
|
> (`uv run python tools/generate_readme_figures.py`), so they always match the current code.
|
|
321
334
|
|
|
322
335
|
# More examples
|
|
@@ -347,7 +360,7 @@ uv run mypy src/PyDiffGame # type-check
|
|
|
347
360
|
```
|
|
348
361
|
|
|
349
362
|
Continuous integration runs the formatter check, linter, type checker and full suite on
|
|
350
|
-
Python 3.11–3.14. See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
|
|
363
|
+
Python 3.11–3.14. See [CONTRIBUTING.md](https://github.com/krichelj/PyDiffGame/blob/master/CONTRIBUTING.md) for details.
|
|
351
364
|
|
|
352
365
|
# Citing
|
|
353
366
|
|
|
@@ -363,7 +376,7 @@ If you use this work, please cite our paper:
|
|
|
363
376
|
doi={10.1109/MED51440.2021.9480269}}
|
|
364
377
|
```
|
|
365
378
|
|
|
366
|
-
Further details can be found in the [citation document](CITATIONS.bib).
|
|
379
|
+
Further details can be found in the [citation document](https://github.com/krichelj/PyDiffGame/blob/master/CITATIONS.bib).
|
|
367
380
|
|
|
368
381
|
# Acknowledgments
|
|
369
382
|
|
|
@@ -375,7 +388,7 @@ and Bar-Ilan Universities, Israel.
|
|
|
375
388
|
|
|
376
389
|
<p align="center">
|
|
377
390
|
<a href="https://istrc.net.technion.ac.il/">
|
|
378
|
-
<img src="images/Logo_ISTRC_Green_English.png" height="80" alt="ISTRC"/>
|
|
391
|
+
<img src="https://raw.githubusercontent.com/krichelj/PyDiffGame/master/images/Logo_ISTRC_Green_English.png" height="80" alt="ISTRC"/>
|
|
379
392
|
</a>
|
|
380
393
|
 
|
|
381
394
|
<a href="https://in.bgu.ac.il/en/Pages/default.aspx">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
PyDiffGame/__init__.py,sha256=
|
|
1
|
+
PyDiffGame/__init__.py,sha256=_Tny98-VXeUcdxdt_mFkp6-XvAuZc_oGOG9UrsGoeZM,1657
|
|
2
2
|
PyDiffGame/_typing.py,sha256=HErUHmfzvkWLPWT1YJl_gpFYZctjkPqsnw3TeHuuggs,912
|
|
3
3
|
PyDiffGame/base.py,sha256=hurrmsjCRQ049rHQGDa78JUBkCbLs-ZufDF8eHW5oNk,17287
|
|
4
4
|
PyDiffGame/comparison.py,sha256=lJVhceZE7FqaNUGu8q1mA6GS0dbBwYFF1mHn0hzKuwM,4145
|
|
@@ -33,7 +33,7 @@ PyDiffGame/examples/figures/PVTOL/PVTOL1.png,sha256=FBgKQSal5ZNyBsGz4RaVye0HBBQU
|
|
|
33
33
|
PyDiffGame/examples/figures/PVTOL/PVTOL10.png,sha256=XyoLMz5WKfg3ny2JxVxVd1Mxjz9WQQn7N87-8YDLisY,77894
|
|
34
34
|
PyDiffGame/examples/figures/PVTOL/PVTOL100.png,sha256=wkMdqrn9hSsIdU-Yhiki3X2fQ7dRRkfLyvBCFx5cMWI,75698
|
|
35
35
|
PyDiffGame/examples/figures/PVTOL/PVTOL1000.png,sha256=Hg_hsf9gnc1HqC4JVjATVay7uDlnIqBRkG8lzpcfiZ0,77630
|
|
36
|
-
pydiffgame-2.0.
|
|
37
|
-
pydiffgame-2.0.
|
|
38
|
-
pydiffgame-2.0.
|
|
39
|
-
pydiffgame-2.0.
|
|
36
|
+
pydiffgame-2.0.1.dist-info/METADATA,sha256=C7i9NhG7bbA3b43Mm35JRBXpTaPR5VOo2FvwRSNVSz8,20580
|
|
37
|
+
pydiffgame-2.0.1.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
38
|
+
pydiffgame-2.0.1.dist-info/licenses/LICENSE,sha256=IYfdsBdqL9SmCEWsXUBTYh303LOWQQRCOUOfZI7PWz8,1139
|
|
39
|
+
pydiffgame-2.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|