feat(training): add wall and rebound curriculum states

This commit is contained in:
Josh Creek
2026-09-01 17:37:52 +01:00
parent 7170400f49
commit e376675fa6
6 changed files with 68 additions and 11 deletions
+5
View File
@@ -442,6 +442,11 @@ STAGES = [
"--near-goal-chance", "0.25",
"--air-drill-chance", "0.15",
"--air-intercept-chance", "0.25",
# Stage 5 established the aerial baseline; Stage 6 adds a
# measured opportunity for wall/rebound decisions without
# changing the preceding stages' distributions.
"--wall-play-chance", "0.10",
"--rebound-chance", "0.10",
*HANDLING_REWARD_FLAGS,
],
"telemetry_floors": {
+9 -1
View File
@@ -27,12 +27,14 @@ class Generation5ConfigTests(unittest.TestCase):
for stage in generation5.STAGES:
flags = stage["flags"]
total = sum(
float(flag_value(flags, name))
float(flag_value(flags, name)) if name in flags else 0.0
for name in (
"--kickoff-chance",
"--near-goal-chance",
"--air-drill-chance",
"--air-intercept-chance",
"--wall-play-chance",
"--rebound-chance",
)
)
with self.subTest(stage=stage["name"]):
@@ -45,6 +47,12 @@ class Generation5ConfigTests(unittest.TestCase):
)
self.assertEqual(flag_value(generation5.STAGES[2]["flags"], "--opponent-mode"), "league")
def test_league_stage_enables_wall_and_rebound_states_after_intercepts(self) -> None:
self.assertEqual(flag_value(generation5.STAGES[2]["flags"], "--wall-play-chance"), "0.10")
self.assertEqual(flag_value(generation5.STAGES[2]["flags"], "--rebound-chance"), "0.10")
self.assertNotIn("--wall-play-chance", generation5.STAGES[0]["flags"])
self.assertNotIn("--rebound-chance", generation5.STAGES[1]["flags"])
def test_telemetry_floors_fail_closed_on_missing_metric(self) -> None:
ok, failures = generation5.telemetry_passes(
generation5.STAGES[0], {"rollout/upright_fraction": 1.0}