4 Commits

Author SHA1 Message Date
ba6b35b3d9 binaries + python 2026-03-18 19:08:24 +01:00
cd097e4e55 Optimize adaptive extrapolation defaults from real-world test data
- Update defaults from test-driven optimization:
  BufferTime=200ms, DiscardTime=30ms, Sensitivity=3.0,
  DeadZone=0.95, MinSpeed=0.0, Damping=5.0
- Add ShotFired column to CSV recording for contamination analysis
- Rewrite Python optimizer with 6-parameter search (sensitivity,
  dead zone, min speed, damping, buffer time, discard time)
- Fix velocity weighting order bug in Python simulation
- Add dead zone, min speed threshold, and damping to Python sim
- Add shot contamination analysis (analyze_shots.py) to measure
  exact IMU perturbation duration per shot
- Support multi-file optimization with mean/worst_case strategies
- Add jitter and overshoot scoring metrics

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 18:33:14 +01:00
af723c944b Rework adaptive extrapolation: deceleration detection + dead zone + debug HUD
Replace variance-based confidence (caused constant lag) with targeted
deceleration detection: compares recent speed (last 25% of safe window)
to average speed. During steady movement ratio≈1 → zero lag.
Only reduces extrapolation when actual braking is detected.

- AdaptiveSensitivity: now a power exponent (0.1-5.0, default 1.0)
- AdaptiveDeadZone: new parameter (default 0.8) to ignore normal
  speed fluctuations and only react to real deceleration
- DebugAntiRecoilHUD: real-time display of ratio, confidence, speeds, errors
- EndPlay: auto-close CSV file when stopping play (no more locked files)
- Python script updated to match new deceleration-based algorithm

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 18:25:54 +01:00
fa257fb87b Add adaptive extrapolation mode, quadratic regression, CSV analysis tool
Anti-recoil prediction improvements:
- New ARM_AdaptiveExtrapolation mode: velocity variance-based confidence
  with separate pos/aim tracking and low-speed protection
- New ARM_WeightedLinearRegression mode: preserves original simple linear fit
- ARM_WeightedRegression upgraded to quadratic (y=a+bt+ct²) with
  linear/quadratic blend and velocity-reversal clamping
- ExtrapolationDamping parameter (all modes): exp decay on extrapolated velocity
- CSV recording (RecordPredictionCSV) for offline parameter tuning
- Python analysis tool (Tools/analyze_antirecoil.py) to find optimal
  AdaptiveSensitivity from recorded data

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 15:21:50 +01:00