Skip to content

ObtuseAI/universal-sports-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Universal Sports Engine

Deterministic simulation. Recursive calibration. Auditable evolution.

A high-throughput, multi-league sports research engine with exact replay, self-tuning analytical ensembles, drift-aware online calibration, and content-addressed champion governance.

Version Python Leagues Tests License

Research release: mechanics, integrity, autonomy, and performance are verified. Real-world predictive supremacy is not claimed without licensed point-in-time data.


Why it is different

Universal Sports Engine treats every simulation and model improvement as evidence, not theater.

  • Exact by construction — immutable event streams, deterministic random namespaces, SHA-256 event chains, and complete result-envelope verification.
  • Fast at two fidelities — analytical F0 distributions for massive Monte Carlo and event-level F1 paths for interpretable game flow.
  • Autonomously adaptive — bounded population search, multiplicative expert weighting, self-calibrating intervals, champion/challenger gates, and prospective shadow updates.
  • Fail-closed — drift alerts quarantine adaptive simulation; failed challengers remain in the ledger; existing checkpoints are never silently overwritten.
  • Portable — dependency-free runtime, clean Python SDK and CLI, deterministic JSON replay, and a domain-neutral stochastic-control boundary.

Verified release snapshot

Dimension Version 0.3 evidence
Supported leagues 7
Tests 67 passed
Negative and mechanism controls 49 passed, 0 failed
Randomized stress 14,000 games / 2,003,304 events / 0 failures
F0 throughput 111K–127K games/second
F1 single-worker throughput 347–1,011 games/second
F1 four-worker scaling 1.42×–1.82×
Recursive autonomy arena 4 promotions / 3 guarded retentions
Calibration and shadow weight changes 7 / 4
Shadow drift alerts 0

Machine-readable results live in release evidence, performance evidence, stress evidence, and the autonomy audit.

Architecture

flowchart TD
    CLI["CLI / Python SDK"] --> GOV["Champion governance"]
    GOV --> CAL["Recursive calibration + online weights"]
    CAL --> F0["F0 analytical distributions"]
    GOV --> F1["F1 event simulation"]
    F0 --> PACKS["Seven isolated league packs"]
    F1 --> PACKS
    PACKS --> CORE["Deterministic event / rule / RNG kernel"]
    CORE --> PROOF["Replay + hashes + evidence bundles"]
    PROOF --> RED["Stress, controls, drift, rollback"]
Loading

The neutral kernel contains no player, inning, possession, ball, puck, or scoreboard type. Sport semantics remain inside league packs; model governance remains outside simulation truth.

Seven leagues, one kernel

Family League packs Primary F1 unit
Bat and ball MLB Pitch / plate appearance / inning
Court invasion NBA, WNBA, NCAA MBB Possession / period / game
Gridiron NFL, NCAA Football Play / drive / game
Ice invasion NHL Event / shift / period

Each pack owns its rules, scoring, clocks, stochastic transitions, and provisional reference anchors. One sport is never treated as a rescaled copy of another.

Recursive improvement engine

flowchart LR
    T["Point-in-time train"] --> S["Bounded population search"]
    S --> C["Chronological calibration"]
    C --> W["Expert reweighting + interval adaptation"]
    W --> G{"All gates pass?"}
    G -- Yes --> P["Promote + freeze checkpoint"]
    G -- No --> R["Retain incumbent + record failure"]
    P --> H["Prospective shadow outcomes"]
    R --> H
    H --> D{"Drift?"}
    D -- Healthy --> W
    D -- Alert --> Q["Quarantine / recalibrate / rollback"]
Loading

Profiles, ensembles, adaptive states, champion bundles, and promotion ledgers all carry independent content hashes. Promoted bundles embed the complete incumbent model and state, so rollback is self-contained rather than merely documented.

Read the full autonomous improvement protocol.

Quick start

python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"

.\.venv\Scripts\sports-engine.exe list-leagues
.\.venv\Scripts\sports-engine.exe simulate --league nba --seed 42
.\.venv\Scripts\sports-engine.exe simulate-fast `
  --league nfl --seed 42 --home-strength 1.0 --away-strength 1.0

Run recursive calibration

.\.venv\Scripts\sports-engine.exe auto-improve `
  --csv data\point-in-time\historical.csv `
  --config AUTONOMY_CONFIG.json `
  --output reports\improvement-run-001

.\.venv\Scripts\sports-engine.exe verify-autonomy `
  --bundle reports\improvement-run-001\champion_bundle.json `
  --ledger reports\improvement-run-001\improvement_ledger.jsonl

Simulate an adaptive champion

.\.venv\Scripts\sports-engine.exe simulate-adaptive `
  --bundle reports\improvement-run-001\champion_bundle.json `
  --league nba --seed 42 --home-strength 1.0 --away-strength 1.0

Evidence and documentation

Document Purpose
Architecture Kernel, fidelity, and governance boundaries
Autonomous improvement Search, weighting, drift, promotion, and rollback
Quality gates Machine-readable non-negotiable release rules
Release evidence Current validation and reproducibility snapshot
Upgrade audit Version 0.3 implementation and results
Known limitations Exact boundaries of demonstrated capability
Prior art Primary references and defensible distinctions

Evidence boundary

The bundled autonomy arena is deliberately synthetic. It proves that the engine can discover, reject, promote, reweight, checkpoint, reload, monitor, and roll back models; it does not turn synthetic outcomes into a claim of real-world accuracy.

Licensed point-in-time game, roster, injury, event, and tracking data are required before held-out predictive certification. F2 spatial agents and F3 physics remain blocked rather than fabricated.


Build measurable worlds. Preserve every decision. Believe only what survives.

About

Deterministic, self-calibrating multi-league sports simulation with auditable replay and recursive model governance.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages