Bots: env reporting, TFIL movement, gun selector and docs refresh
DevControlBot DevControlBot.sh env-file handling and defines, tfil.nim
survival-movement rework, README
ModularBot .env.example, ModularBot.nim, env_report.nim, vbullet_draw.nim
PPO_Bot enemy_tracker.nim
common_libs gun_harness/selector.nim
tests env_report, lead_gain_legacy, rack_membership,
rack_stat_width, tm_pattern_registration adjustments
docs env_reference.md, goto-controller-algorithm.md
This commit is contained in:
@@ -14,8 +14,9 @@
|
||||
## The fix derives every gun-indexed width from `NumRackGuns` (== `len(RackGunNames)`).
|
||||
## This test is the guard that would have caught it:
|
||||
##
|
||||
## A. rack table — `NumRackGuns` is 17, 17 DISTINCT names, and the
|
||||
## membership table and the legacy alias target are in range;
|
||||
## A. rack table — `NumRackGuns` is one entry per gun, DISTINCT names, and
|
||||
## the membership table and the legacy alias target are in
|
||||
## range;
|
||||
## B. source shape — `ModularBot.nim` contains NO literal width/loop bound
|
||||
## narrower than `NumRackGuns` for the gun-indexed
|
||||
## accounting, and sizes them with `NumRackGuns`;
|
||||
@@ -26,10 +27,12 @@
|
||||
## D. live (opt-in) — with a rack that admits ONLY the newest id, the bot
|
||||
## selects it, fires and lands hits (skipped without JARs).
|
||||
##
|
||||
## The ADE+SBC gun (rack id 17) was later RETIRED, so the rack is back to 17 and
|
||||
## the newest id is LEADGAIN (16). The guard is unchanged in shape and in
|
||||
## strength: C3 now proves the fix survives a rack that grows again, which is
|
||||
## the general form of the bug that shipped.
|
||||
## The ADE+SBC gun (rack id 17) was later RETIRED, so the rack went back to 17
|
||||
## with LEADGAIN (16) as the newest id. KNOWLEDGE now occupies id 17 again, so
|
||||
## the newest id is asserted as a DERIVED value (`NumRackGuns - 1`), never a
|
||||
## literal: the guard is unchanged in shape and in strength, and C3 still proves
|
||||
## the fix survives a rack that grows again, which is the general form of the bug
|
||||
## that shipped.
|
||||
##
|
||||
## Run: nim c -r common_libs/tests/test_rack_stat_width.nim
|
||||
## Live: TR_SERVER_JAR=... TR_BATTLE_RUNNER=... nim c -r common_libs/tests/test_rack_stat_width.nim
|
||||
@@ -47,7 +50,7 @@ const
|
||||
adversaryDir = repoRoot / "common_libs" / "test_framework" / "adversaries" / "SittingDuck"
|
||||
statsPath = "/tmp/rack_stat_width_stats.jsonl"
|
||||
PatternId = 5
|
||||
NewestId = NumRackGuns - 1 ## 16 (LEADGAIN), the newest rack id
|
||||
NewestId = NumRackGuns - 1 ## the newest rack id (KNOWLEDGE)
|
||||
LegacyLeadGainId = 16
|
||||
|
||||
var failures = 0
|
||||
@@ -59,7 +62,7 @@ proc check(name: string, ok: bool) =
|
||||
|
||||
proc testRackTable() =
|
||||
check "A1: NumRackGuns is derived from RackGunNames",
|
||||
NumRackGuns == RackGunNames.len and NumRackGuns == 17
|
||||
NumRackGuns == RackGunNames.len and NumRackGuns > 0
|
||||
check "A2: rack membership table has one entry per gun",
|
||||
DefaultRackMembership.len == NumRackGuns
|
||||
var seen = initTable[string, bool]()
|
||||
@@ -176,9 +179,9 @@ proc testAccounting() =
|
||||
check "C3: a rack one gun WIDER is still fully covered by the NumRackGuns width",
|
||||
grownOk and grown[NumRackGuns] == 1
|
||||
|
||||
# The legacy namespace: TR_RACK_BITBRAIN is now unambiguously LEADGAIN's old
|
||||
# The legacy namespace: TR_RACK_BITBRAIN is unambiguously LEADGAIN's old
|
||||
# name (the ADE+SBC gun that briefly owned it was retired), so it always
|
||||
# admits LEADGAIN (16) — the newest id — and nothing else.
|
||||
# admits LEADGAIN (16) — and nothing else, not the gun that reused id 17.
|
||||
for n in RackGunNames: delEnv("TR_RACK_" & n)
|
||||
delEnv("TR_BITBRAIN_NET")
|
||||
putEnv("TR_RACK_BITBRAIN", "both")
|
||||
|
||||
Reference in New Issue
Block a user