TFIL: remove the virtual centre pillar from the shipped default; register j102 env reads
The default mover painted a 30/10 radiance blob on the arena centre even though the arena has NO physical pillar there, creating a 4x4 tile (144x144 px) exclusion zone over open centre floor. Set PillarHotness/PillarRadiance to 0/0 in the shipped default (matching the ring variant) and add TR_TFIL_PILLAR_ON=1 to restore the old 30/10 field for A/B without a rebuild; registered in env_report. Because the shipped default legitimately changed, the default-path parity golden (fixtures/tfil_commit_default.golden) was regenerated from the NEW default, with an explicit 'deliberate default change' note in the test so a future failure is treated as a real regression. Also register the three env reads job j102 added in common_libs/bitbrain (TR_BITBRAIN_MODE / _DECAY_EVERY / _DECAY_SHIFT), which the env-report guard was failing on. Verification: test_env_report all green; test_tfil_commit_env 30/30.
This commit is contained in:
@@ -256,6 +256,8 @@ proc printEffectiveValues(ctx: EnvReportContext) =
|
||||
emit("TR_TFIL_HEAT_TAU", $TfilHeatTau, sourceOf("TR_TFIL_HEAT_TAU"))
|
||||
emit("TR_TFIL_HEAT_POWER_GAIN", $TfilHeatPowerGain,
|
||||
sourceOf("TR_TFIL_HEAT_POWER_GAIN"))
|
||||
emit("TR_TFIL_PILLAR_ON", onOff(PillarHotness > 0.0),
|
||||
sourceOf("TR_TFIL_PILLAR_ON"))
|
||||
|
||||
# ── ramming ───────────────────────────────────────────────────────────────
|
||||
emit("TR_RAM_OPPORTUNITY", onOff(RamOppEnabled), sourceOf("TR_RAM_OPPORTUNITY"))
|
||||
@@ -381,6 +383,8 @@ proc knownEnvNames*(): seq[string] =
|
||||
BB_MEM_ENV, BB_GAINS_ENV, BB_N_ENV, BB_NADE_ENV, BB_RANGE_ENV, BB_LOG_ENV,
|
||||
BB_MIN_OBS_ENV, BB_WARMUP_ENV, BB_ADAPT_ENV, BB_CALIB_ENV, BB_DECAY_ENV,
|
||||
BB_DECAY_FRAC_ENV, BB_SEED_ENV, BB_RESET_ON_TARGET_ENV,
|
||||
# common_libs/bitbrain (counted-SBC library) reads these inline; job j102
|
||||
"TR_BITBRAIN_MODE", "TR_BITBRAIN_DECAY_EVERY", "TR_BITBRAIN_DECAY_SHIFT",
|
||||
]
|
||||
# rack names are constructed from the prefix + gun table, not spelled out
|
||||
for g in RackGunNames:
|
||||
@@ -404,6 +408,7 @@ proc knownEnvNames*(): seq[string] =
|
||||
"TR_TFIL_TILE_REPLAN", "TR_TFIL_COMMIT_TICKS", "TR_TFIL_NO_REV",
|
||||
"TR_TFIL_COMMIT_LOG",
|
||||
"TR_TFIL_HEAT_TIME", "TR_TFIL_HEAT_TAU", "TR_TFIL_HEAT_POWER_GAIN",
|
||||
"TR_TFIL_PILLAR_ON",
|
||||
# harness vars (read by the test framework, inherited by the bot, so they
|
||||
# must NOT be reported as typos)
|
||||
"TR_SERVER_JAR", "TR_BATTLE_RUNNER", "TR_BATTLE_RUNNER_DIR",
|
||||
|
||||
@@ -31,8 +31,17 @@ const CorridorHeat = 20.0
|
||||
const WallHotness = 30.0
|
||||
const WallRadiance = 10.0
|
||||
|
||||
const PillarHotness = 30.0
|
||||
const PillarRadiance = 10.0
|
||||
## The "virtual centre pillar": heat OUR code paints on the arena centre even
|
||||
## though the arena has NO physical pillar there. The shipped default is now
|
||||
## OFF (0/0) — the bot must not avoid open centre floor for no reason. Set
|
||||
## `TR_TFIL_PILLAR_ON=1` to restore the old 30/10 field for A/B (see
|
||||
## `loadTfilPillarEnv`). The ring variant already ships 0/0.
|
||||
const
|
||||
PillarHotnessOn = 30.0
|
||||
PillarRadianceOn = 10.0
|
||||
var
|
||||
PillarHotness* = 0.0
|
||||
PillarRadiance* = 0.0
|
||||
|
||||
const CommitTicks = 15 ## ticks to commit to a dodge point
|
||||
const MinCommitTicks = 5 ## must commit for this many ticks before danger replan allowed
|
||||
@@ -113,6 +122,19 @@ proc loadTfilCommitEnv*() =
|
||||
|
||||
loadTfilCommitEnv()
|
||||
|
||||
proc loadTfilPillarEnv*() =
|
||||
## Read the virtual-centre-pillar knob. OFF by default: the shipped field is
|
||||
## the arena with no invented centre hazard. `TR_TFIL_PILLAR_ON=1` restores
|
||||
## the pre-change 30/10 field so the two defaults can be A/B-ed offline.
|
||||
if getEnvBool("TR_TFIL_PILLAR_ON", false):
|
||||
PillarHotness = PillarHotnessOn
|
||||
PillarRadiance = PillarRadianceOn
|
||||
else:
|
||||
PillarHotness = 0.0
|
||||
PillarRadiance = 0.0
|
||||
|
||||
loadTfilPillarEnv()
|
||||
|
||||
# ── Time-indexed bullet heat (TR_TFIL_HEAT_TIME=1, default OFF = shipped) ─────
|
||||
#
|
||||
# WHY: the flat model gives every bullet-overlapping tile the same heat and
|
||||
|
||||
+11881
-11878
File diff suppressed because it is too large
Load Diff
@@ -15,6 +15,14 @@
|
||||
## Regenerating it from the new code would defeat the check — only do that after
|
||||
## a DELIBERATE change to the shipped defaults.
|
||||
##
|
||||
## *** DELIBERATE DEFAULT CHANGE (this commit): the virtual centre pillar was
|
||||
## removed from the shipped default (PillarHotness/PillarRadiance 30/10 -> 0/0;
|
||||
## TR_TFIL_PILLAR_ON=1 restores it). That legitimately changes the DEFAULT move
|
||||
## path, so the golden was regenerated from the NEW default. This is NOT a
|
||||
## regression being blessed: the fixture replay below is byte-for-byte stable
|
||||
## for a fixed build, it simply runs against a different (pillar-free) field.
|
||||
## If a future change makes this check fail, it is a REAL default-path diff
|
||||
##
|
||||
## The knob-dependent half of this file is wrapped in
|
||||
## `when declared(loadTfilCommitEnv)` so the SAME file still compiles against
|
||||
## the pre-change module and can regenerate the golden there. That is the whole
|
||||
@@ -103,8 +111,11 @@ when defined(tfilGenGolden):
|
||||
block:
|
||||
let recs = replay(loadStates(), loadRoundStarts())
|
||||
var g = "# TFIL default-path parity golden.\n"
|
||||
g.add "# Generated from commit f842ac0 (shipped mover, BEFORE the commit knobs)\n"
|
||||
g.add "# by `nim c -r -d:tfilGenGolden` on this file against `git archive f842ac0`.\n"
|
||||
g.add "# Originally generated from commit f842ac0 (shipped mover, BEFORE the commit knobs).\n"
|
||||
g.add "# REGENERATED from the NEW default after the DELIBERATE removal of the virtual\n"
|
||||
g.add "# centre pillar (PillarHotness/PillarRadiance 30/10 -> 0/0). Set\n"
|
||||
g.add "# TR_TFIL_PILLAR_ON=1 to restore the old field. Not a regression: the shipped\n"
|
||||
g.add "# default change is intentional, so the default path legitimately differs.\n"
|
||||
g.add "# Format: call speed turnRate targetX targetY commitTicks\n"
|
||||
for r in recs: g.add recLine(r) & "\n"
|
||||
createDir(goldenPath.parentDir)
|
||||
@@ -115,6 +126,10 @@ when defined(tfilGenGolden):
|
||||
# ── 1. default-path parity against the pre-change build ──────────────────────
|
||||
|
||||
proc testDefaultParity() =
|
||||
# NOTE: the golden below was regenerated when the virtual centre pillar was
|
||||
# removed from the shipped DEFAULT (DELIBERATE change, not an accidental
|
||||
# regression — see the file header). With the pillar restored via
|
||||
# TR_TFIL_PILLAR_ON=1 the old golden would no longer match, by design.
|
||||
doAssert fileExists(goldenPath), "missing golden: " & goldenPath
|
||||
let recs = replay(loadStates(), loadRoundStarts())
|
||||
var golden: seq[string]
|
||||
|
||||
Reference in New Issue
Block a user