mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-16 12:22:03 +00:00
Compare commits
6 Commits
bca08d266e
...
efda6c1a05
| Author | SHA1 | Date | |
|---|---|---|---|
| efda6c1a05 | |||
| 259b2adc07 | |||
| 8bc16ee048 | |||
| a6c2ed6177 | |||
| 0d29fc44e0 | |||
| cb3732fcb7 |
+15
-4
@@ -110,9 +110,7 @@ STAGES = [
|
|||||||
# and the new weights were too small to compete with the unchanged
|
# and the new weights were too small to compete with the unchanged
|
||||||
# ball-pursuit terms. Generation 2's stage 1 instead:
|
# ball-pursuit terms. Generation 2's stage 1 instead:
|
||||||
# - resumes from FOUNDATION_EXPERIMENT (curric-s5-aggression)
|
# - resumes from FOUNDATION_EXPERIMENT (curric-s5-aggression)
|
||||||
# directly (resume_from_experiment below, plus
|
# directly (resume_from_experiment below) for the first attempt.
|
||||||
# reset_retry_checkpoint so this stage's own retries reset here
|
|
||||||
# too instead of drifting a failed attempt forward).
|
|
||||||
# - raises velocity_to_ball_weight and ball_distance_penalty
|
# - raises velocity_to_ball_weight and ball_distance_penalty
|
||||||
# further (the actual ball-chasing terms, unchanged since stage
|
# further (the actual ball-chasing terms, unchanged since stage
|
||||||
# 5 despite three failed attempts) and ball_touch_reward
|
# 5 despite three failed attempts) and ball_touch_reward
|
||||||
@@ -134,11 +132,24 @@ STAGES = [
|
|||||||
"--goal-reward", "80", # up from 60 (40 default)
|
"--goal-reward", "80", # up from 60 (40 default)
|
||||||
"--draw-penalty", "5",
|
"--draw-penalty", "5",
|
||||||
],
|
],
|
||||||
|
# 2026-07-29: generation 2's own first two attempts (both independently
|
||||||
|
# resumed from FOUNDATION_EXPERIMENT under reset_retry_checkpoint,
|
||||||
|
# identical flags/budget) landed at 32% and 27% win rate — a real
|
||||||
|
# regression either way, but with enough run-to-run spread that
|
||||||
|
# "identical fresh restart" isn't a controlled test of anything. The
|
||||||
|
# first attempt's own trajectory (ep_rew_mean climbing from -10.86
|
||||||
|
# toward ~0 by the 240M-step cutoff, briefly touching positive) looked
|
||||||
|
# closer to convergence than the second's, so rather than another
|
||||||
|
# independent restart from foundation, retries now continue *that*
|
||||||
|
# attempt's own checkpoint for another full timesteps budget — an
|
||||||
|
# actual test of "did it just need more time," not another coin flip.
|
||||||
|
# A third, unrelated attempt crashed immediately (see train.py's
|
||||||
|
# GoalRateCallback KeyError fix) before contributing any real signal
|
||||||
|
# and was discarded rather than counted.
|
||||||
"grounded": False,
|
"grounded": False,
|
||||||
"timesteps": 240_000_000, # ~24h at the standing n-parallel/speedup (20M took ~2h)
|
"timesteps": 240_000_000, # ~24h at the standing n-parallel/speedup (20M took ~2h)
|
||||||
"resume_from_experiment": FOUNDATION_EXPERIMENT,
|
"resume_from_experiment": FOUNDATION_EXPERIMENT,
|
||||||
"reference_experiment": FOUNDATION_EXPERIMENT,
|
"reference_experiment": FOUNDATION_EXPERIMENT,
|
||||||
"reset_retry_checkpoint": True,
|
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
+9
-2
@@ -43,8 +43,15 @@ class GoalRateCallback(BaseCallback):
|
|||||||
def _on_rollout_end(self) -> None:
|
def _on_rollout_end(self) -> None:
|
||||||
if len(self.model.ep_info_buffer) == 0:
|
if len(self.model.ep_info_buffer) == 0:
|
||||||
return
|
return
|
||||||
goal_rate = safe_mean([ep_info["goal_scored"] for ep_info in self.model.ep_info_buffer])
|
# The vendored godot_rl sync bridge (Game/addons/godot_rl_agents/sync.gd,
|
||||||
self.logger.record("rollout/goal_rate", goal_rate)
|
# _training_process) snapshots each agent's info dict once per tick and
|
||||||
|
# has its own "NEEDS REFACTOR" comment on the reset-timing path, so an
|
||||||
|
# episode's terminal info entry can arrive without "goal_scored" at all
|
||||||
|
# (observed crashing a run after 2026-07-28). Skip those rather than
|
||||||
|
# crash training over a monitoring-only metric.
|
||||||
|
rates = [ep_info["goal_scored"] for ep_info in self.model.ep_info_buffer if "goal_scored" in ep_info]
|
||||||
|
if rates:
|
||||||
|
self.logger.record("rollout/goal_rate", safe_mean(rates))
|
||||||
|
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
|
|||||||
Reference in New Issue
Block a user