NuCon/nucon
Dominik Roth 31cb6862e1 Overhaul model learning: kNN+GP, uncertainty, dataset pruning, sim-speed fix
Data collection:
- time_delta is now target game-time; wall sleep = game_delta / sim_speed
  so stored deltas are uniform regardless of GAME_SIM_SPEED setting
- Auto-exclude junk params (GAME_VERSION, TIME, ALARMS_ACTIVE, …) and
  params returning None (uninstalled subsystems)
- Optional include_valve_states=True adds all 53 valve positions as inputs

Model backends (model_type='nn' or 'knn'):
- ReactorKNNModel: k-nearest neighbours with GP interpolation
  - Finds k nearest states, computes per-second transition rates,
    linearly scales to requested game_delta (linear-in-time assumption)
  - forward_with_uncertainty() returns (prediction_dict, gp_std)
    where std≈0 = on known data, std≈1 = out of distribution
- NN training fixed: loss computed in tensor space, mse_loss per batch

Dataset management:
- drop_well_fitted(error_threshold): drop samples model predicts well,
  keep hard cases (useful for NN curriculum)
- drop_redundant(min_state_distance, min_output_distance): drop samples
  that are close in BOTH input state AND output transition space, keeping
  genuinely different dynamics even at the same input state

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 17:16:22 +01:00
..
drake_assets Impl drake 2024-10-03 23:25:53 +02:00
__init__.py Dev and simulator fixes 2026-03-12 16:27:48 +01:00
core.py Add valve API, cheat_mode, and write-only param fixes 2026-03-12 17:16:08 +01:00
drake.py Fix typo in meme 2024-10-03 23:28:29 +02:00
model.py Overhaul model learning: kNN+GP, uncertainty, dataset pruning, sim-speed fix 2026-03-12 17:16:22 +01:00
rl.py Morer objectives and fixes 2024-10-03 21:56:27 +02:00
sim.py Dev and simulator fixes 2026-03-12 16:27:48 +01:00