Bot can never be trapped in rock: nudge, retrace trail, fly out (t72)
This commit is contained in:
@@ -623,3 +623,10 @@ above, including:
|
||||
count toward the raised nozzle allowance (4,000); only rain counts toward rain's 2,500.
|
||||
Factory launches remain uncapped. A full nozzle allowance says “Too much in the air.”
|
||||
The 4,000 tuning preserves the existing eight-second blown-pile collapse check; 6,000 did not.
|
||||
|
||||
- **Buried bot rescue (t72, 2026-10-29).** The owner chose a small nearest-first nudge,
|
||||
then the newest still-open visited position with a message, then flight through rock until
|
||||
open space with a message. This prevents cooling magma from trapping the bot. The nudge
|
||||
requires fully explored space and prefers up on equal distances. A 256-point trail records
|
||||
every four grains without per-tick allocations; loading rebuilds it from the bot position.
|
||||
Searches happen only on burial, capped at 440 nudge and 256 trail probes per escape episode.
|
||||
|
||||
+11
-7
@@ -244,7 +244,7 @@ Starter furnace designs and the milestone list shown in the notebook.
|
||||
- functions: smelterBlueprint
|
||||
- variables: STARTER_DESIGNS, MILESTONES
|
||||
|
||||
### src/sim/world.js (123 lines)
|
||||
### src/sim/world.js (124 lines)
|
||||
World state: the per-cell typed arrays, alloc(), ambient temperature by depth, waking.
|
||||
- functions: emit, bagCap, discover, sharedArray, alloc, depthU, depthY, meanSurface, computeAmbient, fillNoise, renderDirtyXY, renderDirtyChunk, renderDirtyIdx, wakeXY, wakeHeatXY, wakeIdx, wakeHeatIdx
|
||||
- variables: W, H, N, CW, CH, NCH, mat, temp, life, flags, stamp, part, mach, digp, noiseB, airS, netId, isPow, occ, surfY, dirtY, graniteY, basaltY, magmaY, roofY, AMB, worldSeed, surfBase, underD, shallowD, lapse, BW, BH, NB, blockP, blockV, ents, bgm, flyers, ghostBlocks, ghostMolds, renderDirty, awake, hot, hotLvl, powderArea, roofDirty, loadWakeOrder, loadWakePending, loadWakeIndex, tick, tickStamp, machines, molds, nets, pcells, powerDirty, beltL, beltR, screwLists, brokenMachines, ghostMachines, ghostBlocked, EV, bot, bag, bagTotal, player, seen, ledger, stats
|
||||
@@ -337,7 +337,7 @@ Trees (background layer), acorns, saplings, and waking freezing water.
|
||||
- functions: cutTree, treeHeld, findTreeBases, treeSupportTick, woodRoom, treeFall, coldTick, plantTick, setTreeCell, saplingTick, igniteTree
|
||||
- variables: treeBases, saplings, treeDraw
|
||||
|
||||
### src/sim/vacuum.js (200 lines)
|
||||
### src/sim/vacuum.js (203 lines)
|
||||
The vacuum, blowing grains out, grains in flight (flyers), and the flame tool. Material the vacuum would start on at the cursor: a bar, else the nearest loose grain.
|
||||
- functions: vacuumTargetAt, toolVacuum, nozzle, toolBlow, flyOpen, depositNear, bagTemp, landFlyer, flyTick, toolIgnite
|
||||
- variables: blowRR, FLY_G, FLY_Q
|
||||
@@ -355,16 +355,16 @@ Undo (Ctrl+Z) for building, and the bot building ghosts.
|
||||
- functions: undoNote, undoPush, undoRecord, undoLast, clearAllGhosts, ghostTick, ghostTick0
|
||||
- variables: UNDO_MAX, undoStack, undoRec, ghostMissing, ghostIter
|
||||
|
||||
### src/sim/bot.js (55 lines)
|
||||
### src/sim/bot.js (99 lines)
|
||||
The bot: movement and collision with the world.
|
||||
- functions: botBlocked, botOverlapSolid, botSlide, botStep
|
||||
- variables: SLIDE_MAX, SLIDE_STEP
|
||||
- functions: botBlocked, botOverlapSolid, botTrailRecord, botNudgeOpen, botRescue, botSlide, botStep
|
||||
- variables: BOT_TRAIL_SIZE, botTrailX, botTrailY, botTrailHead, botTrailCount, botEscape, BOT_NUDGES, SLIDE_MAX, SLIDE_STEP
|
||||
|
||||
### src/sim/ledger.js (54 lines)
|
||||
Milestone checks (the ledger) and the sky roof line used for cooling.
|
||||
- functions: checkLedger, updateRoof, updateDirtyRoof, scanRoof
|
||||
|
||||
### src/sim/weather.js (87 lines)
|
||||
### src/sim/weather.js (90 lines)
|
||||
Weather: clouds from steam, rain and snow, and the world water count.
|
||||
- functions: wrnd, resetWeather, rainGap, worldWater, absorbSteam, spawnRain, rainAt, weatherTick
|
||||
- variables: WBAND, WS, weather
|
||||
@@ -507,7 +507,7 @@ Startup capabilities and title art.
|
||||
- functions: checkCapabilities, renderCapabilityNotice, canStartGame, buildTitleCells, drawTitle
|
||||
- variables: REQUIRE_WEBGPU, REQUIRE_THREADS, CAPS, CAPS_CHECK, FONT5, TITLE
|
||||
|
||||
### src/ui/saves.js (224 lines)
|
||||
### src/ui/saves.js (237 lines)
|
||||
Saves in IndexedDB, world files (export / import) and the blueprint library.
|
||||
- functions: newWorldId, worldWrite, listWorlds, putWorldEntry, worldNewest, deleteWorld, cleanWorldName, renameWorld, migrateWorlds, saveWorld, newestSave, b64FromBytes, bytesFromB64, gz, packBuffers, unpackBuffers, exportWorld, importWorldFile, libLoad, libSave, bpEncode, bpValid, bpDecode
|
||||
- variables: DB, worldIdTime, worldIdCounter, worldWrites, savingCount
|
||||
@@ -639,6 +639,9 @@ The frame loop and boot.
|
||||
- `test/t_basics.js`: Basics: drilling to rubble, the vacuum and blowing, walls, the ingot mold and bars, belts, blueprints, save/load.
|
||||
- `test/t_blow_collapse.js`: Owner's upward nozzle recipe, inline and with real shared-memory helpers.
|
||||
- `test/t_blow_collapse.py`: Straight-up bagged sand nozzle in the real pixel frame loop.
|
||||
- `test/t_blueprint_valid.js`: Shared blueprint codes must be safe before entering the clipboard or ghost queues.
|
||||
- `test/t_bot_rescue.js`: t72: rescue uses visited space before allowing a bounded escape through rock.
|
||||
- `test/t_bot_rescue.py`: t72: rescue messages and keyboard escape in the pixel game.
|
||||
- `test/t_build.js`: Building: undo (Ctrl+Z), cut, replace a machine with Ctrl, pasting ghosts, and the fan heat warning.
|
||||
- `test/t_caps.py`: Capability detection, title notices and the required-WebGPU startup gate.
|
||||
- `test/t_conveyors.js`: Screw conveyors that never carry liquid (it flows through), screw and belt throughput, filters.
|
||||
@@ -655,6 +658,7 @@ The frame loop and boot.
|
||||
- `test/t_gpu.py`: Dirty uploads, default limits, warm pipelines, world replacement and device recovery.
|
||||
- `test/t_gpu_golden.py`: Frozen world references; seven smooth crops corrected for continuous noise in t91.
|
||||
- `test/t_gpu_light.py`: The former CPU light behavioural checks, now read from the actual GPU light grid.
|
||||
- `test/t_import_save.js`: Import must preserve the running world before reading or replacing it.
|
||||
- `test/t_joins.js`: The oracle states the geometric rule independently of the precomputed neighbour tables.
|
||||
- `test/t_lakes.js`: Generated lakes wake without a tool, settle on their own, and have dry tree bases.
|
||||
- `test/t_load.js`: Reload wakes nearby areas first, without losing distant water, fire or saved state.
|
||||
|
||||
@@ -74,6 +74,12 @@ checks waking within eight ticks separately from the probabilistic consumption o
|
||||
wake/background-tree change. It also checks generated tree bases, startup wakes, and the
|
||||
seed-7 lake leveling within two grains after 6,000 undisturbed ticks, fresh and reloaded.
|
||||
|
||||
`test/t_bot_rescue.js` covers deep basalt burial, nearest/upward and diagonal nudges,
|
||||
unexplored-pocket rejection, newest open trail points, ring wrap/load reset, bounded searches,
|
||||
and flight through rock stopping at open space. Run `python3 test/t_bot_rescue.py` for the
|
||||
focused pixel-browser check: both rescue messages and real keyboard flight out of basalt;
|
||||
screenshots go to `shots/t72-{retrace,escape,open}.png`.
|
||||
|
||||
## Browser tests
|
||||
|
||||
- They need the `.venv` from README.md → Develop; plain `python3` switches to it on its own.
|
||||
|
||||
@@ -4,6 +4,21 @@ What agents have done, newest first. Add an entry for every piece of work: the d
|
||||
note or request it was for, what changed, the files touched, the tests run, and anything left
|
||||
open or not verified. Keep each entry short; the git history has the details.
|
||||
|
||||
## 2026-10-29: t72 rescue the bot from buried natural rock (Codex)
|
||||
|
||||
- Added explored nearest/up-first nudges, a 256-point typed-array trail and messaged
|
||||
retrace/fly-through escape. Trail update O(1), allocation-free; searches capped at 696
|
||||
candidates per burial. Trail resets/rebuilds on load; no worldgen/save format changes.
|
||||
- Files: src/sim/{bot,world}.js, test/t_bot_rescue.{js,py}, docs/{DESIGN,TESTING,PROJECT_MAP}.md,
|
||||
tasks/t72* and this log. Regressions failed first; all 39 headless suites pass (18 rescue checks).
|
||||
- Only browser test: python3 test/t_bot_rescue.py (messages, real keyboard escape, pixel,
|
||||
no page errors); inspected shots/t72-{retrace,escape,open}.png. No full browser suite.
|
||||
- tools/perf.py settled/pixel before -> after: median frame interval 16.67 -> 16.67 ms;
|
||||
CPU frame p50/p95 zoom 2: 9.71/11.34 -> 9.02/10.40 ms, zoom 6: 5.26/7.77 -> 4.19/5.01 ms.
|
||||
Short samples show no regression, not a proven speedup. Sandbox WebGPU failed; host GPU passed.
|
||||
Evidence: /tmp/t72-{red,headless,browser,before,after}.log and before/after JSON.
|
||||
Owner playtest pending. No commit.
|
||||
|
||||
## 2026-10-29: t96 wake new-world lakes and keep trees off their banks (Codex)
|
||||
|
||||
- Wake water after startup reset; omit whole tree candidates on wet/water-connected low banks.
|
||||
|
||||
Reference in New Issue
Block a user