v0.2.0-rc.3: pillar-up escape + advice in fallback + danger POI #22

Merged
halofourteen merged 2 commits from feat/v0.2.0-rc.3-escape into main 2026-05-27 15:31:22 +03:00
halofourteen commented 2026-05-27 14:20:21 +03:00 (Migrated from github.com)

Summary

Live-observation followup to rc.2. The bot was running on rc.2 in a pit
on (608, 90), in an endless flee→timeout→gather→fail→flee loop. Coach
had extracted 5 quality lessons but NONE fired (applied_count=0).
Three concrete fixes here.

The bugs rc.3 closes

1. Pi-coach lessons silently ignored

consultAdvice() was only called from the curriculum's primary skill
path. After a gather skill bailed with no_target or returned a wander
hint, the curriculum reflex dispatched explore.far / wander via a
SEPARATE fallback path that didn't consult advice. Result: lessons like
"do not explore.far near zombies" never triggered.

Fix: that fallback now calls consult() too. If a lesson overrides,
the override runs and reportAdviceOutcome fires after the actual
result. If the lesson says avoid and the bot has a placeable block,
it falls back to survive.pillar-up instead of spinning.

2. No vertical escape from a pit

recovery.tunnel-out digs horizontally with whatever's equipped. In a
stone pit with no pickaxe it tries to dig stone with fists and the
pathfinder watchdog kills the dig after 6s. Bot stays in the pit.

Fix: new skill survive.pillar-up (runtime/skills/pillar-up.js) that
places a block under the bot and jumps onto it. Needs no tool. Works
with dirt, cobblestone, planks, sand — whatever's in inventory. Up to
8 steps per dispatch.

3. Bot didn't escalate on a long wedge

The metric-recovery hook (from rc.1 WIP) escalates after repeated skill
fails, but doesn't trigger on geometric wedge (bot literally not moving).

Fix: new wedge-emergency check at top of curriculumReflex:

  • noProgressReason is wedged-like
  • bot hasn't moved ≥16 blocks in 60s
  • no hostile in 6m (defendReflex handles those)
  • pillar block available
    → dispatch survive.pillar-up. 2-min cooldown between attempts so we
    don't pillar-spam.

Additional

  • recordPOI("danger") on every death — state/<host>/knowledge.db poi table is no longer empty. 6h expiry. Spatial recall via
    poiNearby({kind: "danger"}) lets future logic say "I died here
    last hour, don't pillar-up back into this spot".
  • SAFE_OVERRIDES adds survive.pillar-up + village.choose-base so
    coach lessons can prefer those.

Test plan

  • npm test 255/255 green (+9 pillar-up).
  • Verified live: rc.3 deployed via supervisor hot-restart from
    working tree (child PID 46827, supervisor 31432).
  • Overnight bake: should observe non-zero applied_count on
    lessons 13-17, non-zero poi rows where deaths happen, and the
    bot escaping pits via pillar-up rather than dying in them.

Followups (rc.4 candidates)

  • Bigger pillar-up perimeter sensing: walk to a clear-sky cell before
    pillaring if directly above is a ceiling.
  • village.choose-base ranking that PENALISES danger POI cells.
  • Tool-progression auto-craft when gather.stone returns
    missing_tool (curriculum should auto-suggest craft.wooden-pickaxe).
## Summary Live-observation followup to rc.2. The bot was running on rc.2 in a pit on (608, 90), in an endless flee→timeout→gather→fail→flee loop. Coach had extracted 5 quality lessons but NONE fired (`applied_count=0`). Three concrete fixes here. ## The bugs rc.3 closes ### 1. Pi-coach lessons silently ignored `consultAdvice()` was only called from the curriculum's primary skill path. After a gather skill bailed with `no_target` or returned a wander hint, the curriculum reflex dispatched `explore.far` / `wander` via a SEPARATE fallback path that didn't consult advice. Result: lessons like "do not explore.far near zombies" never triggered. Fix: that fallback now calls `consult()` too. If a lesson overrides, the override runs and `reportAdviceOutcome` fires after the actual result. If the lesson says `avoid` and the bot has a placeable block, it falls back to `survive.pillar-up` instead of spinning. ### 2. No vertical escape from a pit `recovery.tunnel-out` digs horizontally with whatever's equipped. In a stone pit with no pickaxe it tries to dig stone with fists and the pathfinder watchdog kills the dig after 6s. Bot stays in the pit. Fix: new skill `survive.pillar-up` (`runtime/skills/pillar-up.js`) that places a block under the bot and jumps onto it. Needs no tool. Works with dirt, cobblestone, planks, sand — whatever's in inventory. Up to 8 steps per dispatch. ### 3. Bot didn't escalate on a long wedge The metric-recovery hook (from rc.1 WIP) escalates after repeated skill fails, but doesn't trigger on geometric wedge (bot literally not moving). Fix: new wedge-emergency check at top of `curriculumReflex`: - noProgressReason is wedged-like - bot hasn't moved ≥16 blocks in 60s - no hostile in 6m (defendReflex handles those) - pillar block available → dispatch `survive.pillar-up`. 2-min cooldown between attempts so we don't pillar-spam. ## Additional - `recordPOI("danger")` on every death — `state/<host>/knowledge.db poi` table is no longer empty. 6h expiry. Spatial recall via `poiNearby({kind: "danger"})` lets future logic say "I died here last hour, don't pillar-up back into this spot". - `SAFE_OVERRIDES` adds `survive.pillar-up` + `village.choose-base` so coach lessons can prefer those. ## Test plan - [x] `npm test` 255/255 green (+9 pillar-up). - [x] Verified live: rc.3 deployed via supervisor hot-restart from working tree (child PID 46827, supervisor 31432). - [ ] Overnight bake: should observe non-zero `applied_count` on lessons 13-17, non-zero `poi` rows where deaths happen, and the bot escaping pits via pillar-up rather than dying in them. ## Followups (rc.4 candidates) - Bigger pillar-up perimeter sensing: walk to a clear-sky cell before pillaring if directly above is a ceiling. - `village.choose-base` ranking that PENALISES danger POI cells. - Tool-progression auto-craft when `gather.stone` returns `missing_tool` (curriculum should auto-suggest `craft.wooden-pickaxe`).
Sign in to join this conversation.