donkeycar-rl-autoresearch/tests
Paul Huliganga 47d8e5b346 fix: short-lap exploit now TERMINATES the episode, not just penalises
The circle exploit persisted because the penalty alone (-100 per short
lap) was insufficient. The model stayed alive between laps accumulating
small positive rewards, making circling a viable strategy despite the
penalty.

Fix: _compute_reward_and_done() returns (reward, force_terminate).
When a short lap is detected, force_terminate=True is returned and
step() sets terminated=True immediately. The episode ends on the spot —
no more rewards possible. This makes the circle exploit strictly worse
than any forward driving behaviour.

Tests updated: _compute_reward → _compute_reward_and_done, short-lap
test now asserts force_terminate=True.

Agent: pi
Tests: 102 passed
Tests-Added: 0
TypeScript: N/A
2026-04-18 10:42:23 -04:00
..
__init__.py feat: Wave 1 complete — real PPO training, model save, GP+UCB autoresearch, 37 tests passing 2026-04-13 10:03:15 -04:00
test_autoresearch_controller.py fix: reward v4 — full sim bypass kills circular driving at root 2026-04-13 20:56:32 -04:00
test_behavioral_wrappers.py feat: Phase 3 — behavioral control, enhanced evaluator, 53 tests 2026-04-14 09:28:43 -04:00
test_discretize_action.py feat: Wave 1 complete — real PPO training, model save, GP+UCB autoresearch, 37 tests passing 2026-04-13 10:03:15 -04:00
test_end_to_end.py Wave 4: scratch training on generated_track + mountain_track, zero-shot mini_monaco 2026-04-14 22:40:38 -04:00
test_reward_wrapper.py fix: short-lap exploit now TERMINATES the episode, not just penalises 2026-04-18 10:42:23 -04:00
test_runner_integration.py feat: Wave 1 complete — real PPO training, model save, GP+UCB autoresearch, 37 tests passing 2026-04-13 10:03:15 -04:00
test_wave3.py fix: StuckTerminationWrapper + deque import + 102 tests 2026-04-15 09:17:27 -04:00