perf: band toolmode sweeps into three-row passes #104
Loading…
Reference in a new issue
No description provided.
Delete branch "t3/optimize-toolmode-farm-pathing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Toolmode previously walked the 100 disjoint 3×3 tile centres in a serpentine, so the fixed 30×30 chunk inset cost ~297 blocks of centre-to-centre travel before opportunistic swings. A straight pass reaches three adjacent tile rows (the eye-to-crop drop leaves ~4.35 blocks of horizontal reach), so the same plot can be cleared with four trimmed passes.
ToolCoveragePlan: geometry-only boustrophedon over bands of three tile rows, with legs trimmed by the reachable along-track distance. It chooses the shorter axis and the end nearest the bot.WartToolRoute(harvest, true)uses the plan for dense regular waves. It builds, advances and retires legs, holds a pass while a reachable in-band target is about to leave reach (bounded when a ray stays blocked), and hands leftovers back to the per-tile route. Dense/sparse selection is travel-based; sparse, partial, edge and irregular plots are unchanged.WartToolSweeporders reachable targets by their expiry margin inside the active band beforeahead/distance, so a pass clears the urgent column first.FarmSessionenables the coverage route for toolmode;BotModulepasses the real ray-reachability guard into the route.Validation
Tested commit:
46db203aab00cc4e8a1612090c47c6ccad0a0a4f./scripts/ci-preflight.sh./gradlew --no-daemon --max-workers=1 '-Dorg.gradle.jvmargs=-Xms128m -Xmx1g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8' lint build./scripts/check-release-jar.shToolCoveragePlanTest: four legs, trimmed endpoints, every band covers its rows, split bands, irregular/incomplete grids rejected.ToolCoverageRouteTest: dense plan activation, sparse fallback, legacy constructor, band expiry, sweep urgency.ToolCoverageTraversalTest: full 30×30 pass at 1–20 tick confirmation delays, 100 swings, less walking than the per-tile route, corner start, sparse wave.Server-free steering simulation vs the existing route (same reach/confirmation model): a fully ripe 30×30 inset walks ~116–160 blocks depending on start and confirmation delay versus ~127–290 for the per-tile route; the four-pass plan itself is 112 blocks. This is a geometry/trajectory result, not a live-server benchmark; real reach/ray and the custom tool remain attended work.
Notes
Forgejo build passed for tested commit
46db203:build / Java 25 build (pull_request)success. Checks: #104/checks