Migrate snake example to observation_function and refresh its training run

The egocentric/egocentric_player/egocentric_radius flags were removed
from retro_gamer in favor of an explicit observation_function.
snake_observation.py reproduces the old egocentric+board+extras
behavior by calling egocentric_board/encode_board/encode_state
directly, and runs/snake/config.toml now points at it.

That config change made the prior 12,000-episode checkpoint history
incompatible (retro_gamer's checkpoint compatibility checker can't
verify a new observation_function is behaviorally equivalent to the
old flags, so it conservatively refuses to resume), so the old
checkpoints were deleted and a fresh 20,000-episode run was recorded.
Track only the four checkpoints the lab actually references
(ep_1300, ep_2300, ep_4000, ep_20000) instead of all 200, and update
.gitignore so future student runs of runs/snake aren't committed by
default. snake_training.md's Q5 training-curve table and Q6 checkpoint
episodes are updated to match the real numbers from this run.
This commit is contained in:
Chris Proctor
2026-06-24 07:50:41 -04:00
parent e8a24ae7be
commit edbf76071e
9 changed files with 322 additions and 15 deletions

9
.gitignore vendored
View File

@@ -1,2 +1,11 @@
**/__pycache__/*
runs/*
!runs/snake/
!runs/snake/config.toml
!runs/snake/training.log
!runs/snake/checkpoints/
runs/snake/checkpoints/*
!runs/snake/checkpoints/ep_1300.pt
!runs/snake/checkpoints/ep_2300.pt
!runs/snake/checkpoints/ep_4000.pt
!runs/snake/checkpoints/ep_20000.pt