yimothysu / pong-rl

Solving pong via deep reinforcement learning (policy gradients)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Solving Pong w/ Reinforcement Learning (Policy Gradients)

Install

python3.11 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Train

python train.py --epochs <NUM_EPOCHS>

After training for 1,000 epochs, the model becomes able to outplay the opponent.

Run

python run.py

To use pretrained weights, rename model_1000.pt to model.pt and run.

About

Solving pong via deep reinforcement learning (policy gradients)


Languages

Language:Python 100.0%