Skip to content

Training a reinforcement learning model to play pong (UConn CSE2050).

License

Notifications You must be signed in to change notification settings

gordonbchen/pong_rl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pong_rl

Training a reinforcement learning model to play pong (UConn CSE2050).

  • Q-Table
  • DQN (Deep Q Network): implementation for cartpole and pong (all others models only have cartpole training code)
  • Policy Gradients (Reinforce)
  • A2C (Advantage Actor Critic)
  • PPO (Proximal Policy Optimization) with GAE (Generalized Advantage Estimation)

Files

  • dev_log: contains RL notes, project proposal, and project development log
  • pong_rl: contains all model training scripts

Requirements

  • Requires python3 and poetry
  • Install dependencies with poetry install, and activate poetry env with poetry shell
  • Notable dependencies
    • pytorch for autodiff and nn
    • gymnasium for cartpole and pong rl environments
    • tensorboard for logging

Usage

  • Run python3 pong_rl/[model type]/[game training script]
    • Ex: python3 pong_rl/ppo/cartpole.py
    • Trains an rl model to play the game
    • Training outputs and tensorboard logs will be put in outputs
  • Launch tensorboard to inspect training

Sources

About

Training a reinforcement learning model to play pong (UConn CSE2050).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published