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>
|
||
|---|---|---|
| .. | ||
| drake_assets | ||
| __init__.py | ||
| core.py | ||
| drake.py | ||
| model.py | ||
| rl.py | ||
| sim.py | ||