Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/rlcode/reinforcement-learning
/ types & classes
Types & classes
36 in github.com/rlcode/reinforcement-learning
⨍
Functions
200
◇
Types & classes
36
↓ 4 callers
Class
Env
Static 5x5 grid for tabular SARSA / Q-learning. agent=[col,row].
1-grid-world/env.py:60
↓ 3 callers
Class
Cell
Archive entry. snapshot/lives describe the state AT this cell so a worker can restore and keep exploring; traj_last points into the experience
4-atari-hard/2-go-explore.py:76
↓ 2 callers
Class
ActorCritic
3-atari/2-ppo.py:41
↓ 2 callers
Class
DynamicEnv
5x5 grid with horizontally-bouncing obstacles (Deep SARSA, REINFORCE). Goal at (4,4) terminates; obstacle hit costs -1 but continues. State:
1-grid-world/env.py:147
↓ 2 callers
Class
GraphicDisplay
Pygame button-driven viewer for policy / value iteration. Set `display.buttons = [(label, handler[, enabled]), ...]` (up to 4). `enabled` is
1-grid-world/env.py:269
↓ 2 callers
Class
QNetwork
3-atari/1-dqn.py:39
↓ 2 callers
Class
QNetwork
2-cartpole/1-dqn.py:35
↓ 2 callers
Class
ReplayResetEnv
One raw ALE env that starts episodes from demo states. Not a gym env — the vectorized loop in 3-robustify.py drives it directly.
4-atari-hard/env_robustify.py:60
↓ 2 callers
Class
RunLogger
Optional run-directory outputs: metrics.jsonl, periodic / milestone / best checkpoints, resume, and a final.json summary. Inert when run_dir is
4-atari-hard/env_go_explore.py:38
↓ 2 callers
Class
RunningMeanStd
Welford / Chan parallel algorithm. Used for both obs (last frame) and intrinsic-return scaling.
4-atari-hard/1-ppo-rnd.py:126
↓ 1 callers
Class
A2CAgent
2-cartpole/2-a2c.py:60
↓ 1 callers
Class
Actor
2-cartpole/2-a2c.py:35
↓ 1 callers
Class
ActorCritic
2-cartpole/3-ppo.py:66
↓ 1 callers
Class
ActorCriticRND
4-atari-hard/1-ppo-rnd.py:70
↓ 1 callers
Class
Archive
Cell store + novelty-weighted selection + the accept rule. All updates happen serially in the master process.
4-atari-hard/2-go-explore.py:196
↓ 1 callers
Class
Critic
2-cartpole/2-a2c.py:48
↓ 1 callers
Class
DQNAgent
2-cartpole/1-dqn.py:54
↓ 1 callers
Class
DeepSARSAgent
1-grid-world/5-deep_sarsa.py:44
↓ 1 callers
Class
ExperienceLog
Append-only step log as a prev_id linked list (design note 5). RAM holds only the active chunk; full chunks flush to <dir>/chunk_NNNNN.npz (c
4-atari-hard/2-go-explore.py:92
↓ 1 callers
Class
FireResetEnv
3-atari/env.py:24
↓ 1 callers
Class
GRUActorCritic
conv 8/4/3 -> fc + LayerNorm -> GRUCell -> pi, V. Input = 4-stacked 105x80 grayscale frames (4 channels).
4-atari-hard/3-robustify.py:73
↓ 1 callers
Class
LifeLossTerminalEnv
3-atari/env.py:37
↓ 1 callers
Class
PolicyEnv
Pure-data MDP for policy/value iteration. state = [row, col].
1-grid-world/env.py:242
↓ 1 callers
Class
PolicyIteration
1-grid-world/1-policy_iteration.py:6
↓ 1 callers
Class
PolicyNetwork
1-grid-world/6-reinforce.py:32
↓ 1 callers
Class
QLearningAgent
1-grid-world/4-q_learning.py:7
↓ 1 callers
Class
QNetwork
1-grid-world/5-deep_sarsa.py:29
↓ 1 callers
Class
RNDPredictor
Slightly deeper than target — two extra ReLU FCs so it has the capacity to actually fit the target's random projection.
4-atari-hard/1-ppo-rnd.py:110
↓ 1 callers
Class
RNDTarget
4-atari-hard/1-ppo-rnd.py:100
↓ 1 callers
Class
ReinforceAgent
1-grid-world/6-reinforce.py:47
↓ 1 callers
Class
ReplayBuffer
Single-frame uint8 buffer — stacks of 4 are reconstructed at sample time, cutting RAM ~4x vs. storing the full stack per slot.
3-atari/1-dqn.py:58
↓ 1 callers
Class
ResetManager
Owns the shared curriculum across N envs. The trainer calls assign() once to stagger starting points, and update() each time a batch of episodes
4-atari-hard/env_robustify.py:180
↓ 1 callers
Class
RunLogger
Optional run-directory outputs: metrics.jsonl, periodic / 5M-milestone / best checkpoints, resume, and a final.json summary. Inert when run_dir is
4-atari-hard/env.py:67
↓ 1 callers
Class
SARSAgent
1-grid-world/3-sarsa.py:9
↓ 1 callers
Class
StickyActionEnv
repeat_action_probability applied BELOW frameskip — sticky at the raw action level, the standard v5 stochasticity. We build the ALE env with s
4-atari-hard/env_robustify.py:40
↓ 1 callers
Class
ValueIteration
1-grid-world/2-value_iteration.py:4