feat(ModularBot): 6 guns, pattern matcher, melee modules, adversarial bots

- New guns: guess-factor (GF histogram), pattern-matcher (movement tape replay)
- New modules: minimum-risk melee movement, spinning melee radar
- New test bots: PatternMover, RandomMover, WaveSurfer
- Fixed: FeedbackEvent now carries actualX/actualY for proper GF learning
- Fixed: TM gun warmup gating + directional residuals
- Fixed: circular gun integrated formula + multi-bin omega cache
- Fixed: oscillator wall-bounce lockout
- Fixed: phantom meteor perpendicular body orientation
- 6/6 battle wins across all enemy types
This commit is contained in:
2026-09-20 00:59:53 +02:00
parent 254c7dc997
commit 1ed7797cb6
184 changed files with 80149 additions and 21 deletions
@@ -0,0 +1,104 @@
========================================================================
PREDICTOR COMPARISON: BNNBot (Linear+Hebbian) vs WiSARD K=12 vs TsetlinBot (RTM)
Rep power: p1.07 | Hit threshold: 18.0 (0-99 scale, ~18px)
Online learning, cumulative per-enemy | Scores measured across all powers
========================================================================
Enemy: crazy battles=5 rows=2908
Avg MAE (all powers): BNNBot=24.72 WiSARD=22.29 TsetlinBot=27.10 (TM-warm=20.98)
Avg Hit% (all powers): BNNBot= 46.0% WiSARD= 51.4% TsetlinBot= 38.7%
Winner by MAE: WiSARD
Per-power breakdown (MAE, crazy):
Power BNNBot WiSARD TsetlinBot Best
----------------------------------------------------
p0.10 17.14 15.09 19.44 WiSARD
p0.42 18.17 16.03 20.56 WiSARD
p0.74 19.39 17.13 21.83 WiSARD
p1.07 20.86 18.52 23.33 WiSARD
p1.39 22.52 20.09 25.00 WiSARD
p1.71 24.44 21.93 26.92 WiSARD
p2.03 26.71 24.13 29.16 WiSARD
p2.36 29.39 26.77 31.78 WiSARD
p2.68 32.47 29.81 34.77 WiSARD
p3.00 36.07 33.43 38.25 WiSARD
Enemy: spinbot battles=5 rows=1163
Avg MAE (all powers): BNNBot=23.75 WiSARD=24.54 TsetlinBot=30.20 (TM-warm=29.11)
Avg Hit% (all powers): BNNBot= 43.7% WiSARD= 41.1% TsetlinBot= 37.1%
Winner by MAE: BNNBot(Lin+Heb)
Per-power breakdown (MAE, spinbot):
Power BNNBot WiSARD TsetlinBot Best
----------------------------------------------------
p0.10 17.81 18.12 23.61 BNNBot
p0.42 18.60 19.11 24.83 BNNBot
p0.74 19.60 20.24 26.14 BNNBot
p1.07 20.78 21.55 27.52 BNNBot
p1.39 22.13 22.98 28.92 BNNBot
p1.71 23.68 24.60 30.42 BNNBot
p2.03 25.44 26.40 32.04 BNNBot
p2.36 27.45 28.43 33.87 BNNBot
p2.68 29.69 30.67 35.99 BNNBot
p3.00 32.33 33.28 38.64 BNNBot
Enemy: target battles=5 rows=1606
Avg MAE (all powers): BNNBot= 2.68 WiSARD= 2.21 TsetlinBot= 4.14 (TM-warm= 6.50)
Avg Hit% (all powers): BNNBot= 95.5% WiSARD= 97.0% TsetlinBot= 93.5%
Winner by MAE: WiSARD
Per-power breakdown (MAE, target):
Power BNNBot WiSARD TsetlinBot Best
----------------------------------------------------
p0.10 1.71 1.61 3.34 WiSARD
p0.42 1.83 1.62 3.44 WiSARD
p0.74 1.97 1.67 3.57 WiSARD
p1.07 2.16 1.76 3.72 WiSARD
p1.39 2.37 1.88 3.88 WiSARD
p1.71 2.61 2.06 4.08 WiSARD
p2.03 2.92 2.30 4.32 WiSARD
p2.36 3.27 2.60 4.61 WiSARD
p2.68 3.71 3.02 4.99 WiSARD
p3.00 4.23 3.55 5.45 WiSARD
Enemy: walls battles=5 rows=1661
Avg MAE (all powers): BNNBot=15.31 WiSARD=13.22 TsetlinBot=18.81 (TM-warm=15.17)
Avg Hit% (all powers): BNNBot= 69.8% WiSARD= 76.2% TsetlinBot= 62.4%
Winner by MAE: WiSARD
Per-power breakdown (MAE, walls):
Power BNNBot WiSARD TsetlinBot Best
----------------------------------------------------
p0.10 10.38 8.81 13.27 WiSARD
p0.42 10.90 9.21 14.03 WiSARD
p0.74 11.60 9.77 14.93 WiSARD
p1.07 12.43 10.47 15.94 WiSARD
p1.39 13.51 11.42 17.12 WiSARD
p1.71 14.81 12.61 18.50 WiSARD
p2.03 16.40 14.12 20.15 WiSARD
p2.36 18.37 16.00 22.13 WiSARD
p2.68 20.83 18.41 24.54 WiSARD
p3.00 23.85 21.41 27.51 WiSARD
========================================================================
OVERALL SUMMARY (all enemies, all powers combined)
========================================================================
n=73380 data points
MAE: BNNBot=17.61 WiSARD=16.20 TsetlinBot=20.69 (TM warm-phase=18.77)
Hit%: BNNBot=61.9% WiSARD=65.4% TsetlinBot=55.8%
Wins per enemy type (by avg MAE, all powers):
WiSARD: 3/4
BNNBot: 1/4
VERDICT (all-rows MAE): WiSARD K=12
VERDICT (TM warm-phase): WiSARD K=12
Notes:
- BNNBot: linear extrapolation + 24-cell Hebbian residual table (lr=0.1)
- WiSARD: K=12, 276-bit input (4 frames × 69 bits), 23 LUT nodes, bleach=1
- TsetlinBot (RTM): 60 clauses, N_states=15, s=3.0, T=30, shared x/y RTMs
- TM warm = last-50-rows MAE; accounts for cold-start overhead
- Hit threshold: 18.0 (0-99 scale units, ~equivalent to tank body)
- Residuals learned on mean across all powers; tested at each power level
- Enemy types: crazy, spinbot, target, walls