what thrives, chooses.
A cognitive-evolutionary Rocket League AI framework with zero Python: built from scratch as 18 Rust Edition 2024 crates, trained end-to-end on a single NVIDIA RTX 3060 12 GB GPU. The stack covers header-free NVRTC CUDA kernels, BF16 Tensor-Core training, continuous-time event-driven GPU physics, biologically grounded active vision and neuromuscular motor control, autonomous anti-addiction choice verification, and a monochrome OKLab desktop UI.
Most Rocket League RL stacks wrap Python/PyTorch around fixed-tick CPU/C++ stepping, feed the policy full-arena omniscient state tensors, and select from 90-action discrete lookup tables. thrive departs from that on both the systems and the scientific side:
- 100% Rust + CUDA end-to-end (zero Python, zero
nvcc). Physics (GpuArenaBatch&GpuSimBatch), 28-entity canonical tokenization,110°FOV occlusion, neuromuscular motor filtering, BF16 Tensor-Core forward/backward passes, rollout buffers, CT-PPO/RePPO updates, EGGROLL low-rank ES bursts, and multi-boss GPU sparring (cublasGemmEx) all run natively in VRAM, with zero per-step CPU↔GPU roundtrips. - A compact
6.205M-parameter looped Transformer + CfC brain (11.83 MiBBF16). The Entity-Set Looped Transformer adapts its thinking depth via Expected-Value-of-Control (EVC,K = 1..12) and carries Closed-form Continuous-time (CfC) recurrence, a Cerebellar World Model, bitemporal episodic/intention memory, and 5-phase live GPUDusksleep consolidation. - Human-likeness sensorimotor constraints (
Profile::elite()). The profile enforces a110°active camera FOV (ball-cam / car-cam switching with line-of-sight occlusion and object permanence), SCAN dual-channel visuomotor reaction delay (85–135 ms), minimum-jerk continuous analog stick kinematics, physiological8–12 Hztremor, and continuousBeta + Bernoulliactions with causal ground/air+jump action masking. These are human-like bounds on the policy; whether play actually passes as human is left to the Turing-discriminator audit rather than claimed up front. - Anti-addiction and sovereign choice (
T4). A prediction-only, gradient-detachedNeuralSelfMirror(audited via shuffled-labelKS-5leakage tests) plus an unrewarded volitional veto (Free Won't), evaluated on planted reward-hacking traps (RL-P1..P7+ causal ablationsA1–A5). - Security and scientific honesty (
KS-1..KS-10). A zero-pickle ZIP/tensor archive parser (#![forbid(unsafe_code)]) with SHA-256 quarantine for trojanized third-party bot files, an Ed25519-signed immutableIdentityPrior, finite-difference CUDA gradient checks across all 20 custom kernel subsystems (KS-4), NVML VRAM/energy provenance logging (KS-2hard cap at10,752 MiB), and unbroken SHA-256 checkpoint lineage across training stages.
flowchart TD
subgraph Core["Foundations & CUDA Runtime"]
M["thrive-math\nVec3 / Mat3 / BioPriors / RNG"]
C["thrive-cuda\ncudarc 0.19 / NVRTC cache / cuBLAS / NVML"]
K["thrive-kernels\n20 BF16 & FP32 CUDA kernels + KS-4 FD gradcheck"]
end
subgraph World["Physics, Perception & Motor"]
S["thrive-sim\nCPU ref + 4096-arena GPU PDES + GpuArenaBatch"]
V["thrive-vision\n110° FOV camera, occlusion, object permanence"]
MO["thrive-motor\nSCAN delay, minimum-jerk splines, 8–12 Hz tremor"]
O["thrive-obs\n28-entity X-mirror canonical tokenizer"]
end
subgraph Mind["Cognitive Architecture (6.205M Params)"]
B["thrive-brain\nLooped Transformer (K=1..12) + CfC + World Model + BF16 ckpts"]
MEM["thrive-memory\nEpisodic, working memory, PlayOrgans, intentions"]
CH["thrive-choice\nDetached NeuralSelfMirror, Ed25519 IdentityPrior, Veto, CCS"]
DU["thrive-dusk\n5-phase live GPU sleep consolidation + KS-1 rollback"]
end
subgraph Train["Evolution, League & Interop"]
CO["thrive-corpus\nSafe zero-pickle loader + KS-6 quarantine + tactical bot"]
EV["thrive-evo\nGPU-resident CT-PPO/RePPO, EGGROLL ES, MO-MF-PBT, GPU boss pool"]
IN["thrive-interop\nOffline RLBot v5 FlatBuffers TCP + LAN despair bridge"]
EA["thrive-eval\nT3 Turing discriminator, T4 RL-P1..P7, 240-scenario sealed mechanics"]
end
subgraph App["Desktop UI & CLI"]
RN["thrive-render\nHeadless wgpu 3D pitch & car viewport"]
UI["thrive-ui\nMonochrome OKLab lowercase Rune desktop UI"]
CL["thrive-cli\nUnified bringup, G0/G1 audit, gpu-s0/gpu-train, graduate, play, ui"]
end
M --> C --> K
K --> S & B
S --> V & MO & O
V & MO & O --> B
B --> MEM & CH & DU
CO & B & CH & DU --> EV
EV & IN & EA --> CL
RN --> UI --> CL
Full architectural specifications, literature synthesis, and formal kill-switches live in 00-README.md, charter.md, spec/, and plan/. For contributors and refactoring roadmap, see REFACTORING.md.
Every figure below was measured directly on a single desktop NVIDIA GeForce RTX 3060 12 GB (SM 8.6) on NixOS with zero mocked stand-ins (see results/R00.md, results/G0.md, and results/corpus_calibration_and_ladder.md).
| Subsystem / Check | Measured (RTX 3060 12 GB) | Target / Gate | Status |
|---|---|---|---|
cublasGemmEx BF16 (2048³) |
19.86 TFLOPS (0.865 ms, < 1e-4 err) |
>= 19.0 TFLOPS |
PASS |
NVRTC Disk Cache (compute_86, deterministic) |
Cold 43.4 ms / Warm 0.0015 ms |
SHA-256 cached, zero nvcc |
PASS |
KS-3 CPU Physics Parity (100 × 10 s) |
Ball 0.0068 uu / 0.0000°, Car 0.0023 uu / 0.0000° |
< 1.0 uu / < 0.5° |
PASS |
T1 GPU PDES (4,096 parallel arenas) |
332.17M agent-events/s, 1.53 MiB VRAM, 4.38× skip |
>= 1.2M/s, < 200 MiB |
PASS |
KS-4 CUDA Backward Gradcheck |
All 20/20 custom kernel subsystems | FD relative error verified | PASS |
thrive-brain Footprint |
6,204,592 params (11.83 MiB BF16 checkpoint) |
~6.21M, < 13 MiB |
PASS |
KS-5 Detached NeuralSelfMirror Shuffled Audit |
0.244 shuffled accuracy (1.000 structured held-out) |
0.22–0.28 chance |
PASS |
KS-6 Zero-Pickle Archive Quarantine |
24 clean bots loaded, 1 trojanized .lt blocked (pickle_executed = false) |
Zero pickle execution | PASS |
KS-7 Ed25519 IdentityPrior Lock |
Signed & tamper-verified (sha256: 93e3e7cc4bc32c11) |
Rejects mutated priors | PASS |
KS-2 NVML Live Training VRAM Budget |
6.6–6.9 GiB peak during full 192-arena GPU RL |
<= 10.5 GiB (10,752 MiB) |
PASS |
Honest Status (
Axiom A7):v0.1.0is an early working proof-of-concept release demonstrating the complete verified Rust + CUDA framework, physics engine, GPU rollout/PPO/EGGROLL/Dusk pipeline, safety harnesses, and initial trained checkpoints. Full SSL/RLCS-pro convergence (S2 → S5_final) and final 5-gate graduation are actively in progress and tracked forv0.2.0.
| Checkpoint / Stage | Evaluation (Strict Unmodified Profile::elite()) |
Result |
|---|---|---|
stage_S1_g1.thrv (attached to v0.1.0 release, 8.56M ev) |
Full 5-minute (300 s) 2v2 vs SupersonicTacticalBot |
95.0% WR (mirror = 0.938, KS-5 = 0.236) |
S2 active causal-mask CT-PPO (11M+ ev, in progress) |
2v2 vs nyxcontinuos-test |
81.2% WR (83:40 goals; up to 90.6% in focused sweeps) |
S2 active causal-mask CT-PPO (iter 15 -> 30) |
2v2 vs historical stage_S1_g1 |
39.1% -> 57.8% WR (+132 Elo gain across 15 iterations) |
Built on anomalyco/rune + wgpu 30.0.2 with a strict zero-chroma monochrome OKLab theme (dark and light modes), floatable/draggable/minimizable panels, live headless wgpu 3D arena viewport, and zero-copy telemetry updates:
| Dark Mode | Light Mode | Multi-Panel Workspace |
|---|---|---|
![]() |
![]() |
![]() |
The whole ML / research / eval / play surface is drivable from this one UI. thrive ui hosts a live CPU sandbox and a subprocess job runner (crates/thrive-cli/src/jobs.rs, zero changes to the trainers): every CLI subcommand is launchable from the panels, one GPU job at a time, with queue + cancel, stdout/stderr capture into the events log, results/live_telemetry.json mtime-polling for progress, and a KS-2 VRAM gate that refuses starts under memory pressure with a visible event.
| Workspace | Panels | Role |
|---|---|---|
1 live |
arena, choice, population, mind |
Full-bleed 3D stadium flanked by match transport, anti-addiction instrumentation, Pareto population, and the drive/attention inspector |
2 analytics |
league, system |
Elo ladder + RLBot v5 bridge, NVML/throughput/kill-switch ledger + checkpoint SHA-256 verify |
3 sandbox |
sandbox, events, view |
Live CPU physics (gravity, boosts, ball launches, brain/chase/idle policy), bounded event log, camera/shortcuts |
4 ml |
train, eval |
New: ML job selector + editable hyperparameters + start/stop + live progress + checkpoint list; eval suite launcher + job history + gate badges |
5 research |
research |
New: read-only file tree + sanitized text viewer over literature/, research/, spec/, results/*.md |
All twelve panels share the exact same chrome (zero-chroma OKLab, lowercase, 2-child headers, dock auto-hide, drag/resize/Escape rollback, Super+Alt+Arrow workspace carry). The first nine panels keep their original default rects.
btn-trainstarts/stops the selected training job (default:train-campaign; pickgpu-s0,gpu-train, … in thetrainpanel).btn-duskruns a real dusk consolidation pass (gpu-train --iterations 1 --dusk-every 1).- Trap chips (
rl-p1..p7) arm theeval-t3-t4planted-trap audit job. btn-rlbot-bridgelaunches/stops athrive playbridge job (requires a selected checkpoint; the connected flag reflects the real child process).trainpanel: job chips for all 10 subcommands, hyperparameter sliders/choice chips (UI-local until start), checkpoint picker feeding--resume/--checkpoint, live step/loss progress, queue + cancel.evalpanel: one-chip launchers forbringup,g0-audit,calibrate-corpus,eval-t3-t4,verify-g1,graduate, plus the safe-corpus audit, finished-job history, andresults/G*.mdgate badges.researchpanel: click a file to read it (shell-local, sanitized, read-only; symlinks and path traversal refused).
# The unified UI: live sandbox + job runner + trainer telemetry display
cargo run --release -p thrive-cli -- ui
# Optionally load a brain checkpoint for the sandbox and watch a trainer's telemetry
cargo run --release -p thrive-cli -- ui --checkpoint checkpoints/stage_S1_g1.thrv --telemetry results/live_telemetry.jsonJob children re-spawn the running thrive binary ($THRIVE_JOB_BIN overrides), inherit the environment, and are killed when the UI window closes. Externally running trainers still feed the panels through results/live_telemetry.json exactly as before.
- Linux
x86_64with an NVIDIA GPU (Ampere SM 8.6 / RTX 30-series or newer recommended) and NVIDIA driver supporting CUDA 13.x. - Either Nix with flakes enabled (recommended — completely reproducible CUDA 13.5 + Rust + Vulkan/Wayland dev shell) or Rust stable (Edition 2024) + CUDA toolkit (
libnvrtc,libcublas,libcudnn,libcudart).
git clone https://github.com/mitige/thrive.git
cd thrive
# Reproducible Nix dev shell (sets CUDARC_CUDA_VERSION=13040 and CUDA/Vulkan library paths)
nix develop
# Verify full 18-crate workspace compilation & test suite
THRIVE_REQUIRE_CUDA=1 RUSTFLAGS="-D warnings" cargo test --release --workspaceTHRIVE_REQUIRE_CUDA=1 cargo run --release -p thrive-cli -- bringup
THRIVE_REQUIRE_CUDA=1 cargo run --release -p thrive-cli -- g0-audit# Launch the unified Rune UI: live sandbox + ML/research/eval job runner
# (optionally watching an external trainer's live telemetry)
cargo run --release -p thrive-cli -- ui --telemetry results/live_telemetry.json
# Resume or start GPU-resident RL training (requires a parent .thrv checkpoint, e.g. from v0.1.0 release)
THRIVE_REQUIRE_CUDA=1 cargo run --release -p thrive-cli -- gpu-train \
--stage S2 \
--resume checkpoints/stage_S1_g1.thrv \
--out-ckpt checkpoints/stage_S2.thrv \
--iterations 120 --n-arenas 192 --rollout-steps 128
# Same run with hyperparameters from a JSON file (keys = flag names in snake_case,
# e.g. {"stage": "S2", "iterations": 120, "lr": 0.0001}); explicit CLI flags win.
THRIVE_REQUIRE_CUDA=1 cargo run --release -p thrive-cli -- gpu-train \
--resume checkpoints/stage_S1_g1.thrv --out-ckpt checkpoints/stage_S2.thrv \
--config configs/s2.jsonAll paths are portable and overridable via environment variables:
| Variable | Default | Purpose |
|---|---|---|
THRIVE_REQUIRE_CUDA |
0 |
Set to 1 to fail fast instead of falling back if CUDA init fails. |
THRIVE_CORPUS_ROOT |
.. |
Optional directory containing third-party Rocket League bot checkpoints for local sparring/calibration (never committed to this repository). |
THRIVE_RESULTS_DIR |
results |
Output directory for reports, logs (auto-rotated at 16 MiB), telemetry, and provenance ledger. |
THRIVE_CHECKPOINTS_DIR |
checkpoints |
Output directory for rolling BF16 .thrv checkpoints (< 1.5 GiB ring cap). |
THRIVE_BIO_PRIORS |
(built-in) | Optional path to an external bio_priors.json overriding built-in verified constants. |
- Offline Interop Only:
thriveinteracts strictly with its local physics engine (thrive-sim), LANdespair, or offline-rlbotRLBot v5 TCP bridges. It never touches official Rocket League matchmaking or anti-cheat processes. - Zero-Pickle Corpus Quarantine (
KS-6):thrive-corpusis#![forbid(unsafe_code)], parses PyTorch ZIP archives directly in pure Rust without executing Python or pickle opcodes, scans embeddeddata.pklbyte streams for malicious payloads, and enforces a SHA-256 blocklist. - No Third-Party Weights in Git: External bot models and large training logs are strictly excluded via
.gitignore. Onlythrive's own verified12 MiBBF16 checkpoint is published as a GitHub Release asset.
- 18-crate zero-Python Rust Edition 2024 + NVRTC CUDA workspace
- Bit-exact CPU/GPU physics parity (
KS-3) &332Mev/s GPU PDES (T1) -
6.205M-param BF16 Looped Transformer + CfC + World Model +KS-4FD gradcheck (20/20) - End-to-end GPU-resident 2v2/1v1 rollout, causal ground/air+jump action masking, CT-PPO/RePPO, EGGROLL ES, Dusk consolidation, GPU boss sparring pool
- Monochrome OKLab Rune desktop UI + headless
wgpu3D viewport + offline RLBot v5 / LANdespairbridges - Complete
S2 → S5_finalunbroken-lineage multi-billion-event GPU training campaign - Pass all 5 strict full 5-minute graduation gates (Tier 1–4 bots,
#1apex boss, 1v1 specialists, 3 fresh anti-strategy exploiters,T3Turing &T4anti-addiction audits) - Workspace modularization & CUDA
.cukernel extraction (seeREFACTORING.md)
- Evan (
@mitige) — Machine Learning & Research: cognitive architecture, continuous-time RL & evolutionary optimization (CT-PPO/RePPO, EGGROLL ES, MO-MF-PBT, Dusk consolidation), human sensorimotor & active-vision modeling, anti-addiction sovereignty (T4), training & evaluation. - Yanis (
@Expected333) — Development & Refactoring: software engineering, workspace modularization, systems refactoring, and codebase maintainability (seeREFACTORING.md).
Dual-licensed under either of:
at your option.


