fix(runtime): wander/explore.far probe-then-go (bot actually moves)
Ground-truth finding (diag.physics): forward N:0.03 E:3.38 S:0 W:3.26 → forward WORKS in unobstructed dirs jump ΔY=1.25 → jump WORKS (vanilla height) dig untested (no soft block within 6 of spawn) So the bot CAN move and jump — the previous "stands still" symptom was our wander/explore code picking blocked random angles and trusting a pathfinder that times out on this server's terrain. Each retry just picked another random direction, often the same blocked one. - runtime/actions.js wander: probe 4 cardinal yaws for 800ms each, measure actual Δ, commit to the best one for the remaining budget. Falls back to "wedged-jump" (forward+jump 2.5s) only when ALL four cardinals are <0.5 blocks. - runtime/skills/explore-far.js: same probe-then-go shape, scaled to a ~48-block long walk in the best direction. Replaces the static NE/SE/SW/NW quadrant rotation that ignored what was actually walkable. - runtime/movement-profiles.js: canDig back to true on gather/travel/ flee. The earlier "everything false" defensive default was based on a wrong hypothesis (silent dig failure) — diag.physics + server-side inspection (no anti-cheat plugin, spawn-protection=0) showed dig is fine. - runtime/compat.test.js: assertions follow profile defaults. - runtime/skills/diagnose-physics.js: forward probe now tries 4 cardinals and returns trials + bestDir + bestDist so it can be used to debug "wedged" reports later. Verified live: bot now actually walks 47 blocks north after probe.cardinal showed N:2.4 free. First end-to-end real movement on play.xmatic.team since this session started. npm test 124/124. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,20 +13,16 @@ import { isManMadeBlockName, classifyArea, shouldAvoid } from "./claim-avoidance
|
||||
// We can't import owned-blocks.js until config-driven stateDir exists,
|
||||
// so it's tested via an isolated import in a temp dir below.
|
||||
|
||||
// 2026-05-26: canDig is FALSE on every profile because bot.dig silently
|
||||
// fails on the live server (mineflayer #3888 / protocol 775). Once the
|
||||
// 1.21.4 pin restores real digging, gather/travel/flee profiles can flip
|
||||
// canDig back to true.
|
||||
test("movement profile descriptor: gather has canDig=false (silent-dig safeguard)", () => {
|
||||
test("movement profile descriptor: gather has canDig=true (real dig works)", () => {
|
||||
const d = describeProfile(PROFILES.GATHER);
|
||||
assert.equal(d.canDig, false);
|
||||
assert.equal(d.canDig, true);
|
||||
assert.equal(d.canPlace, false);
|
||||
assert.equal(d.allow1by1towers, false);
|
||||
});
|
||||
|
||||
test("movement profile descriptor: flee allows higher drop, canDig=false", () => {
|
||||
test("movement profile descriptor: flee allows higher drop, canDig=true", () => {
|
||||
const d = describeProfile(PROFILES.FLEE);
|
||||
assert.equal(d.canDig, false);
|
||||
assert.equal(d.canDig, true);
|
||||
assert.equal(d.maxDropDown, 8);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user