Files
SirRoboGarage/tools/ab/arms_tfil_commit.txt
SirStone d2005abee9 j144 TFIL: arrival-based commitment + hysteresis + no mid-flight reversal
The owner's live-GUI report was correct on all four counts, and all four are
one bug: the commitment is cancelled by our own tile-boundary crossing
(96.1% of picks, 3793/3946, mean hold 5.06 ticks) while the bot is still
accelerating, and the picker is an unconstrained uniform draw over every
safe tile, so the new target can land in the mirror direction at |speed| < 4.

New knobs, all env-gated and default = today's behaviour (byte-for-byte
default parity guard re-run and green, 51 checks):
  TR_TFIL_COMMIT_ARRIVAL  hold the committed tile until we are ON it; the
                          tick knob becomes a MINIMUM dwell. 0 = shipped.
  TR_TFIL_COMMIT_MARGIN   leave only if the best alternative is at least
                          this much cooler on the same pathMaxHeat scale.
                          0 = shipped.
  TR_TFIL_NOREV_SPEED     while |speed| is below this, a mid-flight switch
                          may not take a tile >90 deg off the travel
                          direction. 0 = shipped. norevPool() never returns
                          an empty pool: with every candidate behind us it
                          takes the least-bad turn.

Offline gate (recorded DrussGT fixture, 20026 ticks): mean hold 4.1 -> 24.0
ticks, abandoned-before-arrival 92.8% -> 40.5%, committed tile actually
reached 3.3% -> 17.2%, opposite-direction slow mid-flight switches 394 -> 64
(-84%). 'TR_TFIL_TILE_REPLAN=off' alone - what cc11ede's arm B already tried -
only gets the hold to 13.6, which is why that A/B could not find this.

strafe is untouched: it imports only heatDecay/bulletMagScale/Pillar*, none
of which this touches. TR_MOVEMENT default stays strafe. Registered in
env_report.nim + knownEnvNames() + .env.example. Arms pre-registered in
docs/movement_campaign.md and tools/ab/arms_tfil_commit.txt.
2026-09-26 21:07:09 +02:00

40 lines
2.5 KiB
Plaintext

# ─────────────────────────────────────────────────────────────────────────────
# arms_tfil_commit.txt — j144: the TFIL COMMITMENT fix, four arms on the frozen
# movement panel (tools/ab/panel_movement.txt), all with TR_MOVEMENT=tfil pinned
# EXPLICITLY.
#
# Owner's report (live GUI, TR_MOVEMENT=tfil): "when the tile to go is selected
# in just a few ticks, the bot is still accelerating and the target changes even
# if the path is still good, and choose a tile that is opposite way, in the
# meantime bullet arrived and hit the bot."
#
# Pre-registered in docs/movement_campaign.md ("TFIL commitment: arrival-based +
# reversal hysteresis") BEFORE any of these battles ran. Reference is `tfil`.
#
# The three knobs are cumulative so the arms isolate one ingredient each:
# ARRIVAL — hold the committed tile until the bot is ON it (a boundary
# crossing stops cancelling the commitment; the tick knob becomes a
# MINIMUM dwell)
# MARGIN — only leave the committed tile if the best alternative is at least
# this much cooler, on the same pathMaxHeat scale the picker uses
# (10.0 = one PathDangerThreshold level)
# NOREV — while |speed| < 4.0 (half of MaxSpeed 8) a mid-flight switch may
# not take a tile more than 90 deg off the travel direction
#
# Format: name | ENV=value ENV=value | label
# ─────────────────────────────────────────────────────────────────────────────
# 1. THE ARM TO BEAT — the shipped tfil defaults, explicitly selected.
tfil | TR_MOVEMENT=tfil | shipped tfil defaults (control / reference)
# 2. arrival only — the commitment ends when the tile is REACHED, not on a
# boundary crossing.
arrive | TR_MOVEMENT=tfil TR_TFIL_COMMIT_ARRIVAL=1 | hold the dodge tile until it is reached
# 3. + hysteresis — "the path is still good" can no longer switch us.
arrive_hyst | TR_MOVEMENT=tfil TR_TFIL_COMMIT_ARRIVAL=1 TR_TFIL_COMMIT_MARGIN=10 | arrival + a 10-lava margin before switching
# 4. THE FULL FIX — arrival + hysteresis + no opposite-direction flip while the
# bot is still accelerating.
arrive_hyst_norev | TR_MOVEMENT=tfil TR_TFIL_COMMIT_ARRIVAL=1 TR_TFIL_COMMIT_MARGIN=10 TR_TFIL_NOREV_SPEED=4 | the full fix