strataq
Thermodynamic instruments for strategic systems. Quantal-response equilibria, potential/harmonic game decomposition, entropy-regularised response, and non-equilibrium strategic dynamics — in JAX, with a plain-numpy toolkit on top.
Some strategic systems settle (landscapes); some circulate forever (whirlpools). From the outside they can look identical. strataq is a set of calibrated meters that tell them apart — from a payoff matrix if you have one, from measured responses or a raw time series if you don't.
import strataq.toolkit as tk
Three questions, one call each
Is my system a landscape or a whirlpool? — from any measured cross-response matrix (e.g. cost pass-through between two firms):
read = tk.reciprocity_read([[1.07, 0.003], [0.0005, 0.97]])
read.r # 0.0011 — this is the actual Dominick's grocery reading
read.verdict # "reciprocal (landscape-like): ..."
read.warnings # the honesty notes travel with the number
Is my time series irreversibly driven? — the instrument that found the diurnal loop in day-ahead electricity prices:
verdict = tk.irreversibility_test(weekly_prices) # any scalar series, ≥ a few hundred points
verdict.detected, verdict.p_value # vs a reversible null with matched persistence
How payoff-sensitive are my agents? — a Bayesian posterior over the logit rationality λ from observed choice frequencies:
est = tk.estimate_rationality([u1, u2], counts=[[412, 95, 493], [301, 402, 297]])
est.mean, (est.ci_low, est.ci_high) # calibrated 95% interval
est.warnings # flags flat likelihoods instead of quoting noise
And for a game you can write down, the full dashboard:
tk.game_thermo([u1, u2], lam=1.5) # harmonic fraction α, reciprocity ℛ, dissipation
The full library
Under the facade: three QRE solvers (damped fixed-point, mirror descent, arclength branch tracer, pygambit-validated), the Hodge potential/harmonic decomposition, equilibrium response matrices χ = (I − SB)⁻¹S, exact Glauber dynamics with currents and entropy production, trajectory estimators (KLD, certified TUR bounds), Hatano–Sasa quench thermodynamics, surrogate nulls, Bayesian estimation with an EFE experiment-selection loop, and domain plugins (Colonel Blotto, traffic networks, electricity markets, retail pricing).
Every claim the library makes is backed by a gated unit with an adversarial
review on record, and every number regenerates from fixed seeds
(make reproduce in the SAGE monorepo).
The interactive companion lives at
sage-labs.vercel.app.
Install
pip install strataq # once published; until then (pip ≥ 21.1):
pip install "strataq @ git+https://github.com/SharathSPhD/sage.git#subdirectory=packages/strataq"
Python ≥ 3.11. CPU JAX by default; float64 is enabled by the library.
import strataq — never import sage (SageMath owns that name).
License
Apache-2.0. Dominick's-derived artifacts carry CC-BY-NC-4.0 (see
strataq.domains.pricing).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file strataq-0.1.0.tar.gz.
File metadata
- Download URL: strataq-0.1.0.tar.gz
- Upload date:
- Size: 97.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcfefec71f13075468b4d156a6a34a8789f581aa4f642549e5223e2adc6db648
|
|
| MD5 |
675f2c252b4d8da6134653091d49961d
|
|
| BLAKE2b-256 |
afcbc96a0ac37d7c413714d92b27c12f9d7a439f2d74112716b0fd21a5d13580
|
File details
Details for the file strataq-0.1.0-py3-none-any.whl.
File metadata
- Download URL: strataq-0.1.0-py3-none-any.whl
- Upload date:
- Size: 100.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc62c8ee7680fb5f15ea3f4a639fd719a7919eed64e90c9949b8d82b41bc599f
|
|
| MD5 |
c1563ae3c346b2dc5a51163b9207eab0
|
|
| BLAKE2b-256 |
7eb3429fe99605aba22425dc5459cc3e8ed890fb40e1a624919bc2340430abe7
|