mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-12 16:43:51 +00:00
fix(training): restore ground_tilt_penalty, add grounded_upright_fraction diagnostic
Round 4 changed three things at once and two of them cut upright pressure: grounded_upright_reward went to 0 and ground_tilt_penalty was cut 2.5x, while the new uprightness multiplier only pays below GROUND_HANDLING_HEIGHT *and* while moving forward *and* facing the ball - a far narrower slice of ticks than the penalty it was meant to replace. Net pressure fell and upright_fraction fell with it (0.268 -> 0.239 -> 0.238, the lowest of any round). Restore ground_tilt_penalty to 0.05 and change nothing else, so this is a genuine single-variable test of multiplier plus full tilt pressure. The conjunctive mechanism itself held up: forward_motion_fraction reached its best sustained value (0.242) without goal_rate sagging, ep_rew_mean turned positive for the first time (+0.28), and eval win rate hit 49% with no reward hacking. Also adds grounded_upright_fraction: a diagnostic, deliberately ungated metric measuring uprightness over real floor-contact ticks instead of sub-3m ticks. upright_fraction has never exceeded 0.331 across four rounds and ~560M steps without cheating, and its denominator is dominated by ballistic transit (airborne_fraction ~0.45, mean_altitude ~4.4m) where attitude is not meaningfully controllable - so it likely cannot measure what the 0.45 floor was meant to capture. Re-baseline that floor from what this reports rather than from another round of reshaping.
This commit is contained in:
+10
-1
@@ -69,7 +69,14 @@ class FlightTelemetryCallback(BaseCallback):
|
||||
24h+ run later, which is what made every past generation's failure mode
|
||||
expensive to diagnose. Requires VecMonitor(..., info_keywords=(...,
|
||||
"airborne_fraction", "mean_altitude", "air_touch_fraction",
|
||||
"vertical_thrust_mean")) — see ShipAIController.get_info."""
|
||||
"vertical_thrust_mean")) — see ShipAIController.get_info.
|
||||
|
||||
grounded_upright_fraction is diagnostic only and deliberately ungated:
|
||||
upright_fraction's denominator is sub-3m ticks, most of which are
|
||||
ballistic transit rather than driving, so it understates uprightness
|
||||
while the ship is actually on the floor. Adding a key here requires
|
||||
adding it to VecMonitor's info_keywords below too, or the bare
|
||||
info[key] lookup raises KeyError mid-run."""
|
||||
|
||||
_KEYS = (
|
||||
"airborne_fraction",
|
||||
@@ -79,6 +86,7 @@ class FlightTelemetryCallback(BaseCallback):
|
||||
"productive_air_touch_fraction",
|
||||
"upright_fraction",
|
||||
"forward_motion_fraction",
|
||||
"grounded_upright_fraction",
|
||||
)
|
||||
|
||||
def _on_step(self) -> bool:
|
||||
@@ -448,6 +456,7 @@ def main():
|
||||
"productive_air_touch_fraction",
|
||||
"upright_fraction",
|
||||
"forward_motion_fraction",
|
||||
"grounded_upright_fraction",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user