NuCon/nucon
Dominik Roth 65190dffea feat: uncertainty-aware training with penalty and abort
sim.py:
- simulator.update(return_uncertainty=True) calls forward_with_uncertainty
  on kNN models and returns the GP std; returns None for NN or when not
  requested (no extra cost if unused)
- No state stored on simulator; caller decides what to do with the value

rl.py (NuconEnv and NuconGoalEnv):
- uncertainty_penalty_start: above this GP std, subtract a linear penalty
  from the reward (scaled by uncertainty_penalty_scale, default 1.0)
- uncertainty_abort: at or above this GP std, set truncated=True
- Only calls update(return_uncertainty=True) when either threshold is set
- Uncertainty only applies when using a simulator (kNN model); ignored otherwise

Example:
    simulator = NuconSimulator()
    simulator.load_model('reactor_knn.pkl')
    env = NuconGoalEnv(..., simulator=simulator,
                       uncertainty_penalty_start=0.3,
                       uncertainty_abort=0.7,
                       uncertainty_penalty_scale=2.0)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 18:37:09 +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 fix: retry game connection in __init__ as well as collect_data 2026-03-12 17:53:35 +01:00
rl.py feat: uncertainty-aware training with penalty and abort 2026-03-12 18:37:09 +01:00
sim.py feat: uncertainty-aware training with penalty and abort 2026-03-12 18:37:09 +01:00