Skip to content

feat(rollout-view): single-window slider viewer + run index/launcher - #5

Merged
liujonathan24 merged 4 commits into
mainfrom
rollout-view-ui
Jun 8, 2026
Merged

feat(rollout-view): single-window slider viewer + run index/launcher#5
liujonathan24 merged 4 commits into
mainfrom
rollout-view-ui

Conversation

@liujonathan24

Copy link
Copy Markdown
Owner

Summary

UI iteration on the rollout views (per request): replace the "single button that appends a frame" with one window that updates in place + a slider, and add one entry page where you choose what to view (no per-run URLs).

  • Single-window viewer (render_run): shows one turn at a time; navigate with a range slider, prev/next buttons, and ←/→ keys. The view replaces, never appends.
  • Index page (/): lists recorded runs under outputs/evals/ (click → viewer) + a live-session launcher (pick variant → /live).
  • Live mode: a Step control (button + Space/s keybind) advances one real turn; POST /step returns an HTML fragment the page appends + jumps to — no reload. Slider/keys scrub the history generated so far.

Routes: / (index), /run?dir=X (recorded viewer), /live?variant=V (start live), POST /step (advance, fragment).

Test Plan

  • 5 new UI tests (slider/keys/step markers, replay-vs-live, index run-list + launcher, discover_runs)
  • Existing rollout-view tests still green (render_turn / export / live stepper)
  • Full suite: 394 passed / 7 failed — the 7 are the pre-existing baseline; zero new failures

Usage

export PYTHONPATH="$PWD:$PWD/environments/nethack"
python -m tools.rollout_view.live_server   # then open http://127.0.0.1:8765/

🤖 Generated with Claude Code

liujonathan24 and others added 4 commits June 7, 2026 19:14
Replace the append-a-frame UI with a single window that updates in place:
- render_run is now a slider-navigated viewer (one turn shown at a time;
  prev/next buttons, a range slider, and arrow-key scrubbing). Live mode adds a
  Step control (button + Space/s) that appends the new turn in place via POST
  /step returning an HTML fragment — no full reload.
- New index page (/) lists recorded runs under outputs/evals (click to view) and
  a live-session launcher (pick variant -> /live). The server gains /run?dir=,
  /live?variant=, and a fragment /step.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nerator

Redesign the index page with a retro-pixel terminal aesthetic (fits NetHack):
Press Start 2P / VT323 pixel fonts, CRT scanlines, neon glow, pixel-bordered
panels, a ▸ menu cursor on run hover; functional bits unchanged (live launcher
+ /run links), accessible (prefers-reduced-motion). Add tools/rollout_view/demo.py
to generate keyless scripted trace runs (incl. IMG with real images) so the
viewer has data to show.
…-to-zoom

- Shared theme.py (dungeon-stone grays + candy-pastel accent tiles); index and
  trace viewer both pull it so the scheme can't drift. Replaces the loud green.
- Fix: recorded-run images 404'd over HTTP (relative paths). render_turn/run now
  take an img_src resolver; the server adds a /file route (restricted to the runs
  root) and points images at it. Live sessions still use inline data-URIs.
- Click-to-zoom lightbox on obs images (crisp pixel scaling, Esc/click to close).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The IMG render is faithful (79x21 square tiles, no aspect bug) but mostly black
early game, and was cramped in a half-width column. Move the obs image into its
own full-width row above the columns, displayed at full width with crisp pixel
upscaling — content reads big, absolute positions preserved (no crop). Text
stays in the LLM column; click-to-zoom still gives full-screen.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@liujonathan24
liujonathan24 merged commit 0c332ac into main Jun 8, 2026
1 check passed
@liujonathan24
liujonathan24 deleted the rollout-view-ui branch June 8, 2026 05:33
liujonathan24 added a commit that referenced this pull request Jun 10, 2026
…et-kills, pet-aware descent) — fix #5

Death is what ends ~3 of 4 runs (not turns), so attack survival directly:

- Prompt: add a STAY ALIVE section naming the real death causes (starvation,
  melee-swarm at low HP, ranged threats) and steering to eat proactively / throw.
- Toolset: add the  (ranged attack) skill to the netplay set.
- explore_and_descend pet tactics:
  * pet-aware descent — wait on the downstairs (<=8 turns) for the pet to be
    adjacent so it follows us down (an adjacent pet descends with you in NetHack);
    descend anyway if it can't catch up.
  * let the pet kill + kite — when a hostile is adjacent AND the pet is engaging
    it, retreat one tile (kite, <=4 steps) to let the pet trade blows for free
    instead of taking melee damage; melee only if cornered or the pet can't finish.

Closed-loop 8-seed descent unchanged (3/8); explore/combat/skills tests pass.
n=6 eval signal is noise-dominated (B1 and JSON move opposite directions per
change); launching n=24 B1+JSON to measure for real. Observed:  still
unused by the model (0 calls); food/eat uptake jumped (eat 4->52 on B1).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
liujonathan24 added a commit that referenced this pull request Jun 10, 2026
B1 (ASCII) = 2.29 +/- 0.24 SE, JSON = 1.96 +/- 0.27 (NetPlay = 2.6); B1 within
~1.3 SE of parity, JSON trails. Death dominates endings (B1 22/24 deaths, 2
turn-outs). Fix #5 (survival/pet) is neutral at n=24 — the n=6 swings were noise.
Text beats vision; the gap is variance + death, not exploration.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant