fix(ModularBot): ram loop prevention, dead-target guards, cleaner logging

- 30-tick cooldown after ghost-stuck/timeout ram exit prevents re-entry loop
- enemy_tracker.update() skips dead bots to prevent same-tick scan resurrection
- TFIL graphics cleared when ramming is active movement
- [config] logs: white base with green-highlighted changes only
- [ram:enter] logs trigger reason and key values on false→true transition
- [death] and [target-invalid] logs retained for diagnostics
This commit is contained in:
2026-09-20 20:44:45 +02:00
parent 1f8574db1d
commit 2cc2a3bd87
30 changed files with 927 additions and 161 deletions
+12 -10
View File
@@ -23,23 +23,25 @@ type
feat: array[7, float]
KNNGun* = object
obs: seq[Obs]
obsHead: int # ring-buffer write index
waves: seq[KNNWave]
obs: seq[Obs]
obsHead: int # ring-buffer write index
waves: seq[KNNWave]
# per-tick cache
cachedTick: int
cachedWaveStored: bool
cachedTick: int
cachedWaveStored: bool
# rolling normalization ranges
featMin: array[7, float]
featMax: array[7, float]
featMin: array[7, float]
featMax: array[7, float]
# state for feature extraction
lastSpeed: float
lastDirection: float # +1 or -1
lastSpeed: float
lastDirection: float # +1 or -1
timeSinceDirChange: int
debugGraphics*: bool
proc initKNNGun*(): KNNGun =
result.cachedTick = -1
result.cachedTick = -1
result.lastDirection = 1.0
result.debugGraphics = false
for i in 0..6:
result.featMin[i] = 1e18
result.featMax[i] = -1e18