Skip to content

reddragonnm/ppo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Atari Breakout PPO Agent

This repository implements a Proximal Policy Optimization (PPO) agent to play Atari Breakout using PyTorch and Gymnasium. It includes training, evaluation, and video rendering utilities.

Breakout Gameplay

Features

Getting Started

Requirements

  • Python 3.10+
  • PyTorch
  • Gymnasium
  • ALE-py
  • OpenCV
  • imageio

Install dependencies:

pip install torch gymnasium[atari] ale-py opencv-python imageio

Training

To train the agent:

python main.py

or use main.ipynb for interactive training.

Checkpoints are saved in models/.

Evaluation

To run the trained agent:

python test.py

This loads models/best_model.pth and plays Breakout.

Video Generation

To render a video of the best run:

python make_best_video.py

Output is saved to videos/ (see videos/best_video.mp4).

File Overview

Example Results

License

MIT License


References:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published