Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Honest Gait Lights-Out Foundry

An autonomous, inspectable research laboratory for evolving safer quadruped locomotion in MuJoCo.

Honest Gait evolves recurrent controllers, preserves every meaningful candidate as a fossil, and then tests those candidates in a separate receiving laboratory. Motion is not automatically called walking. A controller must beat a matched passive body, produce repeatable multi-foot steps, avoid disqualifying impacts, and pass progressively harder held-out gates.

The project is designed around a simple principle:

Search may propose. Independent evidence must decide.

This repository is a research prototype and a visible demonstration of a broader “lights-out laboratory” architecture: an AI can help choose bounded experiments, deterministic code runs them, a knowledge graph remembers both successes and failures, and promotion remains governed by fixed tests.

Current release

v2.3.1

  • Constant-width evolution: every generation within a run has the same number of competitors.
  • A true sparse continuous-time recurrent “liquid” controller with no imposed gait oscillator, phase clock, sinusoid, or leg-phase table.
  • Optional campaign-locked tonic rate neurons (0–5); these are continuously active rate units, not discrete biological spikes.
  • Activity-guided micro-Hebbian evolution between episodes. This changes inherited mutations; it is not online Hebbian learning.
  • Coherent whole-animal, public hit-point, and weakest-part anatomical hit-point discovery treatments.
  • Permanent content-addressed fossil memory and a staged passive-relative gait Ladder.
  • Side-by-side live actuator and recurrent-brain visualizations.
  • A front-page JSON system biopsy for compact external review.
  • An inspectable knowledge graph with a visible relation graph and bounded, read-only traversal by a local gpt-oss:120b model.
  • Backup-aware reset controls so experimental state can be removed without deleting required machinery files.

The laboratory

flowchart TD
    A["Legacy recurrent forge"] --> C["Permanent fossil library"]
    B["Sparse liquid forge"] --> C
    C --> D["Passive-relative gait Ladder"]
    D -->|near-miss| C
    D -->|all gates pass| E["Frozen acquired gait"]
    E --> F["Bounded safety refinery"]
Loading

1. Two evolutionary forges

The preserved legacy forge and the newer liquid forge run independently. The liquid branch evolves:

  • sparse directed topology;
  • signed connection weights;
  • neuron biases;
  • per-neuron time constants;
  • optional tonic activity floors;
  • activity-based mutation protection that fades rather than freezing genes.

The full preset uses 33 clamped sensor nodes, 72 internal recurrent neurons, and eight recurrent motor neurons. Motor states remain part of the recurrent graph and may feed back into it.

Within an episode, neural state changes continuously. Synaptic parameters do not. Evolution—including micro-Hebbian activity-guided mutation—occurs only between evaluated candidates.

2. Permanent fossils

Selected controllers are copied into an append-only, content-addressed fossil library with their lineage, treatment, mutation operator, generation, and discovery evidence. Later evolution cannot rewrite an earlier fossil.

3. Independent gait admission

Every fossil enters a separate receiving lab. The receiving lab compares it with an action-free version of the same body under matched seeds and worlds, so settling, springs, inherited velocity, or an external push cannot impersonate locomotion.

Admission requires more than distance. The gate also considers:

  • complete survival and catastrophic failures;
  • passive-relative signed displacement;
  • repeatable support cycles;
  • genuine stance–swing–touchdown steps;
  • at least three participating feet;
  • progress distributed across the episode;
  • torso clearance;
  • non-foot contact and impact force.

A near-miss remains useful evidence, but it is not silently promoted.

4. Frozen handoff and residual refinement

Only a fossil that clears the full acquisition path can become a frozen base controller. The downstream refinery may evolve a bounded residual correction, but it cannot alter the base gait or exceed its torque authority.

The AI Experimenter

The configured local model is a laboratory strategist, not the controller and not the judge. It may:

  • propose a traversal of the knowledge graph;
  • explain compacted evidence with citations;
  • select from pre-registered experiments at allowed boundaries;
  • state a hypothesis, rationale, and stopping rule.

It may not:

  • write controller weights or reward formulas;
  • alter measurements or verdicts;
  • change a running campaign;
  • edit the knowledge graph;
  • choose certification seeds or lower admission gates.

Python validates traversal rules, executes them read-only, bounds the returned graph, and records model errors or deterministic fallback behavior.

Discovery treatments

The reward system is experimental and explicitly separated from certification.

Treatment Discovery currency Important limitation
Coherent Smooth whole-animal locomotion plus non-injury bottleneck Training improvement is not gait certification.
Public HP Passive-relative distance before one public 200-HP budget is depleted Unspent HP earns nothing; a healthy statue scores zero.
Anatomical HP Passive-relative distance before the weakest public body-part budget is depleted Public heuristic only; it does not read the frozen judge.

The first test of each treatment is a deterministic plumbing smoke test. Passing a smoke test means the reward behaves as specified—not that it can teach walking. A defensible comparison requires completed same-seed campaigns followed by the unchanged receiving Ladder.

System biopsy and knowledge graph

The dashboard’s Copy system biopsy JSON button produces a compact handoff containing:

  • current run and controller truth;
  • foundry assembly-line state;
  • recent admissions and abbreviated history;
  • reward treatment and smoke-test state;
  • proposal candidates;
  • KG size and integrity;
  • supported, negative, mixed, proposed, and still-unknown claims;
  • the last bounded model traversal and answer diagnostic.

Paste that JSON into an external review conversation to audit the laboratory without shipping large checkpoints or replay files.

The KG tab also provides a searchable record browser, a visible relation graph, manual traversal, and evidence-grounded questions to the local model.

Quick start

Requirements

  • Python 3 with venv
  • macOS, Linux, or Windows
  • Enough local CPU time for MuJoCo evolution
  • Ollama plus gpt-oss:120b for the full local AI-experimenter workflow

The simulator and dashboard dependencies are installed from requirements.txt. The 120B model is demanding and is not needed to understand or test the deterministic controller code, but the turnkey macOS launcher currently verifies that exact model before opening the complete laboratory.

macOS

Install Ollama and pull the configured model once:

ollama pull gpt-oss:120b

Then double-click START_MAC.command, or run:

./START_MAC.command

The launcher creates .venv, installs Python dependencies, starts Ollama if necessary, verifies the model, launches the laboratory, and opens:

http://127.0.0.1:5070

Linux

chmod +x run_mac_linux.sh
./run_mac_linux.sh

Windows

Double-click:

start_windows.bat

Manual launch

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python refinery_dashboard.py --port 5070

On Windows PowerShell, activate with .venv\Scripts\Activate.ps1.

Run modes

Mode Purpose Liquid target Population per arm Active-time budget
Smoke Verify machinery only 8 generations 8 0.08 h
Overnight First serious search 600 generations 32 9 h
Full Lab Long autonomous run 1,200 generations 48 24 h

Targets are upper bounds. A slow computer may reach its active-time budget before the generation target. Completed generations are checkpointed and resumable.

Command-line examples:

python run_lights_out.py --mode smoke --seed 1207
python run_lights_out.py --mode overnight --seed 1207
python run_lights_out.py --mode full --seed 1207 --tonic-count 2
python run_lights_out.py --resume

Concrete reward modes remain available as explicitly labeled research ablations:

python run_lights_out.py --mode overnight --seed 1207 --reward-mode anatomical_hp
python run_lights_out.py --mode overnight --seed 1207 --reward-mode hit_points

Testing

Run the deterministic test suite:

pytest -q

Then run the small integrated smoke:

python run_lights_out.py --mode smoke --seed 1207

These tests validate machinery, checkpointing, reward contracts, graph boundaries, and MuJoCo integration. They do not establish that a short run learned a gait.

Repository map

Path Role
liquid_controller.py Sparse continuous-time recurrent controller
liquid_factory/ Liquid evolution, mutation governor, fossils, and Pantheon
factory/ Preserved legacy Evolution Forge
gait_ladder.py Passive-relative staged gait admission
factory_bridge.py Fossil intake and controller reconstruction
end_to_end_foundry.py Coordinator and bounded experimenter state machine
lights_out_kg.py Typed scientific memory and validated traversal
gpt120_supervisor.py Local model planning and schema-checked synthesis
refinery_campaign.py Bounded residual safety refinement
templates/, static/ Unified browser laboratory
SCIENTIFIC_CONTRACT.md Non-negotiable evidence boundaries
docs/ Architecture, long-run, HP, biopsy, and experimenter guides

Experimental data

Runtime state is written beneath lab_data/. It may contain large checkpoints, fossils, KG state, admission replays, and champion records.

Do not publish lab_data/, .venv/, logs, caches, or local checkpoints in the source repository. Use the dashboard’s backup/reset path when you intentionally want fresh machinery, and retain the generated backup separately.

Honest status

This project does not currently claim a certified autonomous gait from the v2.3 liquid system. It claims an operational, inspectable pathway for searching, retaining candidates, diagnosing failure, and demanding stronger evidence before calling motion a gait.

Known areas for improvement include:

  • repairing and preventing dangling KG edges;
  • reconciling biopsy evidence classification with raw gait-admission verdicts;
  • making global KG totals unmistakably separate from a model’s bounded traversal;
  • enforcing the external-explanation boundary in model prose as well as structured output;
  • completing matched multi-seed reward-treatment panels;
  • testing whether optional tonic nodes or micro-Hebbian evolution improve admission outcomes.

Negative results are part of the result. A run that produces thousands of fossils without a certified gait is not hidden or relabeled as success.

Roadmap

  • Stronger KG integrity repair and compact global summaries
  • Multiple independent same-seed treatment panels
  • More efficient admission scheduling and fossil-family aggregation
  • Formal ablations of activity protection, tonic nodes, and micro-Hebbian mutation
  • Cleaner reproducible source-only releases and archived data bundles
  • Transfer of the bounded lights-out-lab pattern to other scientific domains

Credits

Created by Adam Sohnen, MD.

The later laboratory architecture, implementation, scientific-integrity review, end-to-end integration, and dashboard were developed collaboratively with Codex by OpenAI.

MuJoCo and Three.js provide the simulation and browser-rendering foundations. Ollama provides local model serving.

License

No software license has yet been selected for the public release. Until a license is added, ordinary copyright restrictions apply. Choose and add a license before inviting reuse or outside contributions.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages