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.

Install from PyPI

JinnLab is available on PyPI:

python3 -m pip install jinnlab
jinnlab

Upgrade to the latest release with:

python3 -m pip install --upgrade jinnlab

Package page:

https://pypi.org/project/jinnlab/

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.3.3.tar.gz (23.5 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.3.3-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for jinnlab-3.3.3.tar.gz
Algorithm Hash digest
SHA256 7e745736dbe9d88323c777aed6e6e08c6b7b132e070d1912196377ad1323f8b0
MD5 c0baeff15235cc98e809b6149cd07b87
BLAKE2b-256 0bc5db946ed1209cabc61a5c9346803969d596c9b55bd02bd1ffae27a1614d45

See more details on using hashes here.

Provenance

The following attestation bundles were made for jinnlab-3.3.3.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.3.3-py3-none-any.whl.

File metadata

  • Download URL: jinnlab-3.3.3-py3-none-any.whl
  • Upload date:
  • Size: 23.1 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.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 53e0ac7c622733d18f33356c44b4c4f1102ba461f66f70989779aff2e828f7f1
MD5 27c427b8e2ab5697e30b6f9c908cbd45
BLAKE2b-256 9cf672adceb78b34a3be1ae8d866e0a22b249a6c72a875e6ea5906614a0a87b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for jinnlab-3.3.3-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