Repository navigation
Run log and replay: live --arms --log writes grl_snam.run_log/v1, grl-snam ariadne replay plays it (Phase 4a) - #176
Merged
Merged
Conversation
…-snam ariadne replay plays it Phase 4a. A live comparison of policies can now be recorded and played back. - grl_snam.learning.runlog (no host): RunLog writes and reads grl_snam.run_log/v1. Per tick and arm: the cars template's log fields (each arm a car), the size, every drive telemetry field, the books, the Stats row and the plant ledger's items; the legs; meta with each arm's policy and hashes, the seed, start, goal, the keys that rebuild the world, the settings, and the provenance (GRL-SNAM version and commit, libcvc's version, --history files with sha256). - live --arms --log writes it; ArmsRun records the plant ledger and the vehicle size per tick. - grl-snam ariadne replay run.npz (docs/replay.ari: libcvc's sim_transport and stats_panels.ari): rebuilds the recorded world, draws each ghost and track at the play head, and writes the Stats and Ledger windows there. Step, Restart, a Position slider, Loop, --at/--paused/--camera; the charts carry a cursor at play.t and a click seeks. - Live and replay share one path: _arms.panel_tables, _arms.chart_series and live's update_ghosts take arrays, so a replay shows what the live run showed at that tick, cell for cell (tested at the end and mid-run).
transfix
force-pushed
the
feat/run-log-replay
branch
from
November 14, 2026 08:44
a681ec8 to
e8193ae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is Phase 4a of the plan: record and play back a live comparison of policies. It builds on #175 (
live --arms).grl-snam ariadne live austin-freedrive --plant kinematic --arms trained,untrained,constant \ --retarget-at 20 --log run.npz grl-snam ariadne replay run.npzThe run log:
grl_snam.learning.runlog,grl_snam.run_log/v1RunLogwrites and reads one.npz. It needs no host, so it is in the coverage gate.Per tick and arm, as (T, A) arrays, it holds:
carstemplate's log fields, with each arm as a car:x y heading speed steer vx vy goal_x goal_y goal_dist reached coef_*. Anything that reads the template's logs can read this one.msand the vehicle'slength,widthandwheelbase.tel_<field>: every drive telemetry field.book_<name>: the energy books.stats_<col>: the Stats row.plant_<key>: the plant ledger's items, NaN where an item doesn't apply.It also keeps the legs (
leg_tick,leg_goal). ThemetaJSON holds:.cvcnavit ran with its sha256, its source's sha256 and its policy key;run.*andworld.*keys that rebuild the world, and the settings;libcvc.so.X.Y.Z), and each--history H.jsonlwith its sha256.RunLog.at(k, j)gives arm j's values at tick k, with the books summed up to that tick.The plan named
RunLog(CarsLog). This version writesCarsLog's layout instead of subclassing it, sogrl_snam.learningstays free of pycvc_gl.live --arms --logwrites itArmsRunnow also records the plant ledger and the vehicle size each tick, and keeps running book sums. The run log replaces #175's interimgrl_snam.live_arms/v1.livewithout--armsstill writes thecarstemplate's log, unchanged.grl-snam ariadne replay run.npzstats_panels.ari) as they were at that tick.docs/replay.ariuses libcvc'scomponents/sim_transport.ari(optional import, with a fallback unit): Paused, Speed, Step (one tick while paused) and Restart. Beside it are a Position slider that scrubs, Loop and the camera.cursor: play.t, and a click on one seeks viapick: play.seek/arms_seek. In a live run the cursor is unset and a click does nothing.--at,--paused,--loopand--camera. Headless, it builds no world; the panels follow the play head.stats_panels.arinow show only in a live run (arms.live).player.ariis unchanged.One path for live and replay.
_arms.panel_tables,_arms.chart_seriesandlive.update_ghoststake arrays. Both ports call them, so a replay shows what the live run showed at the same tick, cell for cell.Tests
tests/learning/test_learning_runlog.py(host-free):carsfields;index,legandat(summed books, n/a plant items);tests/test_ariadne_live_arms.py:GRL_SNAM_ARIADNE_GL=1);Locally:
runlog.pyhas 88% coverage from the host-free tests alone.Screenshot: a replay of a 40 s Austin run (kinematic, three arms, retarget at 20 s), paused at 26 s with the orbit camera. The chart cursor is at 26 s and the "leg 2" marker at 20 s. It is
phase4a-replay-austin-26s.pngin the session's shared notes.