Skip to main content

Terminal game-theory laboratory for Axelrod matches, Moran processes, tournaments, and strategy analytics

Project description

JinnLab 3

JinnLab Architecture

JinnLab is a keyboard-first Textual research workbench for repeated Prisoner's Dilemma and evolutionary game theory.

Portfolio-grade capabilities

  • Head-to-head Axelrod matches with cooperation metrics and seeded reproducibility.
  • Batch experiment builder across multiple strategies and seeds.
  • Pairwise strategy payoff matrix.
  • Finite-population evolutionary simulation with mutation and generation snapshots.
  • Round-robin tournament rankings.
  • Rule-based Strategy Designer with persistent version lineage (v1 → v2 → v3).
  • Persistent strategy notes and experiment notebook (hypothesis, observation, conclusion).
  • Reproducible experiment IDs and match reruns.
  • SQLite/WAL persistence, CSV export, analytics, and a headless JSON/CSV CLI.
  • In-app instructions and plain-English result interpretation on every analysis workflow.

TUI

Run:

jinnlab

Keyboard shortcuts: m starts a match, 19 navigate major labs, r refreshes, e exports, and q quits.

The Guide tab explains score, cooperation rate, tournament rank, population share, seeds, repetitions, and how to avoid over-interpreting a single run.

Headless CLI

jinnlab match "Tit For Tat" Defector --turns 200 --repetitions 10 --seed 42
jinnlab tournament "Tit For Tat" Defector Grudger Cooperator --output csv
jinnlab matrix "Tit For Tat" Defector Grudger
jinnlab evolve "Tit For Tat=40" "Defector=30" "Cooperator=30" --generations 100

Install

bash install.sh
jinnlab

Data lives at ~/.local/share/jinnlab/jinnlab.db; exports live under ~/.local/share/jinnlab/exports/.

Development

python3 -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
pytest

CI and container

GitHub Actions tests Python 3.10–3.12 on pushes and pull requests.

Headless experiments can run in a container:

docker build -t jinnlab .
docker run --rm jinnlab match "Tit For Tat" Defector --seed 42

The TUI is intended for a real terminal; the container entry point defaults to the headless CLI.

Keyboard shortcuts

  • m — start the current Match experiment
  • b — run the Batch experiment
  • d — save the current Strategy Designer version
  • 19 — switch major workbench tabs
  • e — export experiments to CSV
  • q — quit

The Match, Batch, and Designer screens are vertically scrollable so their primary action buttons remain reachable on smaller terminals.

3.2 Designer live refresh

Custom strategy families are available immediately after saving. Use FamilyName for the latest version or FamilyName vN for an exact saved version.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jinnlab-3.2.1.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

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

jinnlab-3.2.1-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file jinnlab-3.2.1.tar.gz.

File metadata

  • Download URL: jinnlab-3.2.1.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for jinnlab-3.2.1.tar.gz
Algorithm Hash digest
SHA256 4df4a7115e259120bc628f59780b7b129cdd2db5ad3e2f3de22a2cc985814651
MD5 910cb77b5586631fb357f74e933188d2
BLAKE2b-256 5b048b36d26d929e606a1476f4ddea9f99ca5855e3554b5bb8a9a3d0f09de30f

See more details on using hashes here.

Provenance

The following attestation bundles were made for jinnlab-3.2.1.tar.gz:

Publisher: publish.yml on iamrichmack111/jinnlab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jinnlab-3.2.1-py3-none-any.whl.

File metadata

  • Download URL: jinnlab-3.2.1-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for jinnlab-3.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ac45793a9270d6217a5dfcce562bfd772cdf5e05c400271fe31262069dff5a3
MD5 bbada4789e49d406f88e64f92f7d91ef
BLAKE2b-256 aa4d043d33c8d8f5065ea241127687be2d6e690b85cea68dfe6a748f6887eba2

See more details on using hashes here.

Provenance

The following attestation bundles were made for jinnlab-3.2.1-py3-none-any.whl:

Publisher: publish.yml on iamrichmack111/jinnlab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page