RL Agent
Reinforcement-learning sandbox with PPO training pipelines for a standard benchmark environment and a custom 1D environment (InterruptGoalLineEnv) where the goal switches at a randomized mid-episode timestep to probe how the agent handles interruptibility.
RL Agent is a reinforcement-learning sandbox built around PPO training. Two training pipelines: a standard benchmark baseline, and a custom 1D environment where the goal switches at a randomized mid-episode timestep to probe how a PPO agent handles interruptibility and goal change.
Custom environment design
InterruptGoalLineEnv is a custom RL environment.
- Observation space: position, current goal, and step fraction inside the episode.
- Action space: three discrete actions (left, stay, right).
- Goal switch: the goal starts at
goal_aand switches togoal_bat a randomized step aroundswitch_step ± switch_jitter. - Randomized start: position is sampled per episode around 0 with configurable jitter to force generalization across starting conditions.
- Reward: dense distance-based reward (negative absolute distance from the current goal) with a small per-step penalty so the policy learns to finish quickly.
Training pipeline
PPO against both the standard benchmark and the custom environment. Pipeline: train, save checkpoints, evaluate over N episodes with deterministic action selection, render a few episodes for visual inspection.
What shipped
Working PPO training pipelines against both a standard benchmark and a custom interruptibility environment. Custom environment built with proper RL interfaces, randomized initial conditions, and a dense reward shape that gives the policy gradient through the mid-episode goal switch.