Files
SirRoboGarage/tools/elm_bench/ring_same.log
T
SirStone 16c71c527a tools/elm_bench: ring label experiment — the ring label is NOT learnable
Gate question: can a ring-based label (a 2-D offset from the belief centre to
where a ray ring touches the enemy) be predicted from our own belief state?
extract_ring.py + bench_ring.nim answer it by MERGING the ring label into
samples_realistic.ndjson, so the ring label and the incumbent 1-D aim-error
label are scored on the SAME rows, the SAME features and the SAME round-group
folds. 8119 of 8676 DrussGT shot rows get a ring label.

Verdict: worse, not richer.

  * The spike's headline is an artifact. The belief is already accurate to
    under 3 px, so a belief-anchored ring touches the enemy on its FIRST ray
    step: ringK = 1.0000 for all 172723 extracted events. The "100% at power
    <= 1.5, 0.2% at power 3.0" pattern is just whether 1 * bulletSpeed fits
    inside the +-18 px belief-error ball. The literal ring label is the 1-tick
    belief extrapolation error, clipped to BotRadius.
  * Same-tick it scores better than the 1-D label (ELM/const 0.2628 vs 0.3629)
    but a single feature, beliefTgtLatVel, already gets -71.8 of the -73.7
    points: the model is re-deriving beliefTgtLatVel * age / beliefDist, i.e.
    its own inputs.
  * Under --prev it collapses to ratio 0.9819 (-1.8%). It depends MORE on the
    same-tick assumption than the 1-D label (-63.7% -> -1.0%), not less.
  * Repaired (--kintercept: k = round(believed range / bullet speed), mean k 42,
    no clipping, 60 px spread) the label is well posed and completely
    unpredictable: best feature +0.5%, best ELM -0.4%, best |corr| 0.09.

So: the belief-extrapolation error at intercept time is not a function of what
we believed, it is the opponent's unmodelled acceleration. Do not ship a ring
label. common_libs/guns/waveelm.nim is the right shape for the same idea and
is a different thing: it fires the ring from the SHOOTER, so the ring measures
an interception radius and bearing and the ELM learns a bias correction to it.
2026-10-05 22:59:41 +02:00

109 lines
6.4 KiB
Plaintext

== dataset: ring_drussgt.ndjson.merged ==
n = 8119 groups = 40 k mean = 1.00
== label distribution (rad, same units for both) ==
ring mean -0.00023 sd 0.01044 |p1| 0.02166 |p50| 0.00008 |p90| 0.01476 max|.| 0.02704
1-D aim mean +0.11074 sd 1.17266 |p1| 2.90099 |p50| 0.00668 |p90| 1.80735 max|.| 3.14139
########## LABEL = label (RING lateral aim correction) ##########
== (a) constant baseline, 5-fold by round-group ==
constant per-fold 0.0104 +- 0.0002 pooled RMSE/MAE/medAE 0.0104/0.0083/0.0069
== (B) ridge feature ablation (pooled held-out) ==
feature set | RMSE MAE medAE | per-fold RMSE +- sd | vs const
baseline 6 (belief geometry) | 0.0104 0.0083 0.0069 | 0.0104 +- 0.0002 | +0.0000
+ scan age | 0.0029 0.0021 0.0015 | 0.0029 +- 0.0001 | -0.0075
+ believed intercept geom | 0.0026 0.0018 0.0012 | 0.0026 +- 0.0001 | -0.0078
+ our own state | 0.0029 0.0021 0.0015 | 0.0029 +- 0.0001 | -0.0075
+ context | 0.0029 0.0021 0.0015 | 0.0029 +- 0.0001 | -0.0075
+ scan + intercept | 0.0026 0.0018 0.0012 | 0.0026 +- 0.0001 | -0.0078
ALL 21 | 0.0026 0.0018 0.0012 | 0.0026 +- 0.0001 | -0.0078
-- single-feature ridge (held-out, sorted) --
tgtLatVel RMSE 0.00294 (const 0.01044, gain +71.84%)
predErr RMSE 0.00803 (const 0.01044, gain +23.13%)
closing RMSE 0.01034 (const 0.01044, gain +0.95%)
sinRel RMSE 0.01041 (const 0.01044, gain +0.28%)
scanAge RMSE 0.01041 (const 0.01044, gain +0.28%)
logScan RMSE 0.01041 (const 0.01044, gain +0.28%)
everScanned RMSE 0.01041 (const 0.01044, gain +0.28%)
scanGap RMSE 0.01041 (const 0.01044, gain +0.28%)
dist RMSE 0.01041 (const 0.01044, gain +0.28%)
disp RMSE 0.01041 (const 0.01044, gain +0.28%)
gunHeat RMSE 0.01041 (const 0.01044, gain +0.28%)
tof RMSE 0.01041 (const 0.01044, gain +0.28%)
power RMSE 0.01041 (const 0.01044, gain +0.28%)
tgtSpeed RMSE 0.01041 (const 0.01044, gain +0.28%)
ownSpeed RMSE 0.01041 (const 0.01044, gain +0.26%)
cosRel RMSE 0.01041 (const 0.01044, gain +0.25%)
sinPred RMSE 0.01042 (const 0.01044, gain +0.25%)
cosPred RMSE 0.01047 (const 0.01044, gain -0.23%)
losRate RMSE 0.01573 (const 0.01044, gain -50.70%)
== (C) ELM sweep H{16,32,64,128} x lambda{1e-6..1e2}, decay=1.0 (20 cfg x 5 folds) ==
5/20 configs, 2.s
10/20 configs, 5.s
15/20 configs, 11.s
20/20 configs, 22.s
top 6 (ALL 21 features), per-fold RMSE | mean
H= 128 lam= 1.e-02 | 0.0027 0.0026 0.0028 0.0027 0.0028 | mean 0.00274 (-73.7% vs const)
H= 128 lam= 1.e-04 | 0.0028 0.0026 0.0029 0.0027 0.0028 | mean 0.00275 (-73.7% vs const)
H= 128 lam= 1.e-06 | 0.0028 0.0026 0.0029 0.0027 0.0028 | mean 0.00275 (-73.7% vs const)
H= 128 lam= 1.e+00 | 0.0028 0.0027 0.0029 0.0028 0.0029 | mean 0.00282 (-72.9% vs const)
H= 64 lam= 1.e-02 | 0.0028 0.0028 0.0029 0.0028 0.0029 | mean 0.00285 (-72.7% vs const)
H= 64 lam= 1.e-04 | 0.0028 0.0028 0.0029 0.0028 0.0029 | mean 0.00285 (-72.7% vs const)
BEST H=128 lam=1.e-02: pooled RMSE/MAE/medAE 0.00274/0.00190/0.00136 delta-vs-const -0.00767 (better on 5/5)
ELM/const pooled RMSE ratio 0.2628
########## LABEL = label1d (incumbent 1-D aim error) ##########
== (a) constant baseline, 5-fold by round-group ==
constant per-fold 1.1674 +- 0.0310 pooled RMSE/MAE/medAE 1.1728/0.8251/0.4661
== (B) ridge feature ablation (pooled held-out) ==
feature set | RMSE MAE medAE | per-fold RMSE +- sd | vs const
baseline 6 (belief geometry) | 1.1718 0.8229 0.4801 | 1.1663 +- 0.0314 | -0.0010
+ scan age | 0.9534 0.6431 0.3751 | 0.9531 +- 0.0228 | -0.2194
+ believed intercept geom | 0.4436 0.1716 0.1097 | 0.4430 +- 0.0463 | -0.7293
+ our own state | 0.9538 0.6436 0.3754 | 0.9535 +- 0.0223 | -0.2190
+ context | 0.9534 0.6433 0.3740 | 0.9531 +- 0.0241 | -0.2195
+ scan + intercept | 0.4436 0.1716 0.1096 | 0.4430 +- 0.0463 | -0.7293
ALL 21 | 0.4439 0.1723 0.1108 | 0.4434 +- 0.0465 | -0.7289
-- single-feature ridge (held-out, sorted) --
predErr RMSE 0.44568 (const 1.17283, gain +62.00%)
tgtLatVel RMSE 0.95457 (const 1.17283, gain +18.61%)
closing RMSE 1.15851 (const 1.17283, gain +1.22%)
tof RMSE 1.16638 (const 1.17283, gain +0.55%)
power RMSE 1.16689 (const 1.17283, gain +0.51%)
tgtSpeed RMSE 1.16719 (const 1.17283, gain +0.48%)
gunHeat RMSE 1.16736 (const 1.17283, gain +0.47%)
sinRel RMSE 1.16737 (const 1.17283, gain +0.47%)
disp RMSE 1.16737 (const 1.17283, gain +0.47%)
scanAge RMSE 1.16738 (const 1.17283, gain +0.47%)
logScan RMSE 1.16738 (const 1.17283, gain +0.47%)
everScanned RMSE 1.16738 (const 1.17283, gain +0.47%)
scanGap RMSE 1.16738 (const 1.17283, gain +0.47%)
dist RMSE 1.16738 (const 1.17283, gain +0.46%)
cosRel RMSE 1.16776 (const 1.17283, gain +0.43%)
sinPred RMSE 1.16781 (const 1.17283, gain +0.43%)
ownSpeed RMSE 1.16792 (const 1.17283, gain +0.42%)
cosPred RMSE 1.17901 (const 1.17283, gain -0.53%)
losRate RMSE 1.40867 (const 1.17283, gain -20.11%)
== (C) ELM sweep H{16,32,64,128} x lambda{1e-6..1e2}, decay=1.0 (20 cfg x 5 folds) ==
5/20 configs, 2.s
10/20 configs, 5.s
15/20 configs, 10.s
20/20 configs, 21.s
top 6 (ALL 21 features), per-fold RMSE | mean
H= 128 lam= 1.e-02 | 0.3672 0.4830 0.4038 0.4327 0.4402 | mean 0.42537 (-63.7% vs const)
H= 128 lam= 1.e-04 | 0.3686 0.4839 0.4064 0.4321 0.4414 | mean 0.42647 (-63.6% vs const)
H= 128 lam= 1.e-06 | 0.3686 0.4839 0.4065 0.4321 0.4414 | mean 0.42649 (-63.6% vs const)
H= 128 lam= 1.e+00 | 0.3689 0.4975 0.4077 0.4485 0.4428 | mean 0.43309 (-63.1% vs const)
H= 64 lam= 1.e-02 | 0.3769 0.5047 0.4257 0.4478 0.4447 | mean 0.43996 (-62.5% vs const)
H= 64 lam= 1.e-04 | 0.3776 0.5045 0.4259 0.4475 0.4446 | mean 0.44002 (-62.5% vs const)
BEST H=128 lam=1.e-02: pooled RMSE/MAE/medAE 0.42562/0.18273/0.11064 delta-vs-const -0.74201 (better on 5/5)
ELM/const pooled RMSE ratio 0.3629