Spaces:
Sleeping
Sleeping
Commit History
-
chore: un-pause Space — other runpod clients dominate, our pause has no effect
b0ef027 -
chore: temporarily pause Space to isolate other runpod clients
36cb9e9 -
chore: drop START_PAUSED — Space runs the agent loop on boot again
e756f4d -
revert: noisy-eval conclusion; restore 9×9 viewport + START_PAUSED, add controlled scenarios
Commit 9f22305 ("ship experiment winner — 5×5 viewport + cache") was based on long-horizon eval runs whose signal was dominated by HTTP-500 fallbacks from a contended 4-slot runpod. With the live HF Space and 3 concurrent eval agents all sharing the pod, fallback rates were 50–80% and most "actions" in the metrics were not model decisions. A controlled re-run on hand-authored fixed scenarios (audited in parallel by Codex GPT-5) showed the opposite verdict: variant score tool calls median latency baseline 9×9 10/10 100% 2.2s viewport_5 8/10 100% 2.5s temp_0 9/10 100% 3.8s temp_high 9/10 100% 5.2s thinking_on 9/10 91% 12.0s Changes: - agent-brain.js: buildPickFirstPrompt default radius back to 4 (9×9). The 5×5 setting from 9f22305 came from a noisy long-horizon run. - Dockerfile: re-add ENV START_PAUSED=1. Commit 9f22305 removed it while the agent loop is bei…e782f75 -
feat: ship experiment winner — 5×5 viewport + cache, restore Space loop
Ran a controlled benchmark sweep (eval.ts) over five variants × multiple seeds × 20-30 turns each, on a paused-Space + restarted-pod (clean contention environment). Headline numbers from per-variant averages: variant n real/N entropy med ms tilesVisited viewport_5 2 0.62 1.49 7696 12.5 ← best on every metric temp_high 2 0.35 0.46 6536 8.0 baseline 1 0.30 0.00 7751 10.0 viewport_13 2 0.22 0.46 9513 5.5 temp_0 2 0.17 0.00 11956 4.5 cache_on 1 0.40 0.54 3787 n/a ← 80% cache hit, 4× faster Direction histogram across all 9 runs combined: down 41 / right 12 / left 7 / up 4. The "always up" finding from the empty-world probe was artificial — in real worlds with terrain features the model heavily biases *down*. Smaller viewport produced the most direction diversity (viewport_5 seed 2 hit entropy 1.98 with all four directions used). Changes: - agent-brain.js: buildP…9f22305 -
chore: boot Space paused during experiment phase
Add START_PAUSED env var support in server.ts. When START_PAUSED=1, agent loop comes up idle and waits for /api/resume. Set it in the Dockerfile so the deployed Space stops hammering the shared runpod endpoint while we run controlled experiments locally. Resume via the browser when the Space should run again. Local dev unaffected (env unset → unpaused as before). Also: - engine.js: SinglePlayerGame now accepts a {seed} option using a mulberry32 PRNG so eval runs are reproducible across variants. - agent-brain.js: buildPickFirstPrompt and analyzeViewport now take an optional radius (default 4 = 9×9). Allows variant sweeps. - eval.ts (new): headless agent benchmark. Takes --variant --seed --turns and emits one JSON metrics object per run. Variants in VARIANTS map (baseline, viewport_5, viewport_13, temp_0/high, thinking_on, cache_on). Captures: diamonds/N, realActionRate, illegalMoveRate, pickPrecision, directionEntropy, medianLatency, cacheHitRate, full per-turn token s…327ab12 -
feat: move agent loop server-side, multi-viewer SSE livestream
Previously each browser tab ran its own SinglePlayerGame, AgentMemory, and inference loop — two tabs meant two independent worlds with two independent agents. Now the agent runs once on a Bun server that owns the world state and broadcasts every turn to all connected viewers via Server-Sent Events. Multiple tabs see the same agent acting on the same world in lockstep. Files: - server.ts (new): Bun HTTP server. Lifts connect/callModel/callSummarizer/ agent loop verbatim from the previous client-side script. After each turn builds a JSON state snapshot {viewport, inventory, stats, actions, status, thinking, summary, debug} and broadcasts to a Set of SSE controllers. New connections get an immediate snapshot so they don't wait a full turn. All round-1+round-2 mechanics carry over: structured tool_calls, cache_prompt:true, enable_thinking:false, pair-aware trim, popLast on inference failure, n_ctx-derived budgets, LLM-summarization compaction. - index.html: stripped from a 3…f7df30f
-
chore: aggressive cleanup — keep only the browser harness
The repo started as a research project with a multi-agent REST API, ONNX-based eval scripts, a CLI agent client, and several test suites. The shipped browser harness now hits a remote llama.cpp endpoint directly and has no need for any of that infrastructure. Drop it. Removed: - server.ts, gameState.ts, aiService.ts (legacy multi-agent REST API) - middleware/, types.ts, agent-client.ts, replay.html - API.md, openapi.yaml (REST API docs) - __tests__/ entire directory: 10 ai-eval scripts (~1500 LOC) + their result JSONs, plus the e2e/integration/unit test suites for the multi-agent server - Dockerfile, package.json, bun.lockb (no runtime deps anymore) Slimmed: - engine.js: 481 → 175 LOC. Drops the prompt-building helpers (SYS_PROMPT, FEW_SHOT, buildUserPrompt, buildMessages, MCQ_*, getAdjacencyFromViewport, parseAction, isValidAction), the pixel-buffer renderers (renderMapToRGBA, renderAnnotatedMapToRGBA, EMOJI_COLOURS), and unexports the world-gen internals. Public surface…49df1c0 -
deploy: add HF Spaces Dockerfile and Space frontmatter
Mirrors the deploy config that was already running on huggingface.co/spaces/victor/mini-world before this branch was force-pushed. Bun image, server.ts on port 7860, Spaces SDK. Pulls back in: - Dockerfile: oven/bun:1-alpine, frozen-lockfile install, runs as bun user, exposes 7860, CMD runs `bun server.ts`. - README YAML frontmatter: title/emoji/colors, sdk: docker, app_port: 7860 — needed for the Space to build and render the card.f40f7c8