Skip to main content

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

strataq-0.1.0.tar.gz (97.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

strataq-0.1.0-py3-none-any.whl (100.6 kB view details)

Uploaded Python 3

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

Hashes for strataq-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bcfefec71f13075468b4d156a6a34a8789f581aa4f642549e5223e2adc6db648
MD5 675f2c252b4d8da6134653091d49961d
BLAKE2b-256 afcbc96a0ac37d7c413714d92b27c12f9d7a439f2d74112716b0fd21a5d13580

See more details on using hashes here.

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

Hashes for strataq-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc62c8ee7680fb5f15ea3f4a639fd719a7919eed64e90c9949b8d82b41bc599f
MD5 c1563ae3c346b2dc5a51163b9207eab0
BLAKE2b-256 7eb3429fe99605aba22425dc5459cc3e8ed890fb40e1a624919bc2340430abe7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page