Skip to content

Instantly share code, notes, and snippets.

View CPPAlien's full-sized avatar
🎯
Focusing

Chris CPPAlien

🎯
Focusing
View GitHub Profile
@CPPAlien
CPPAlien / pg-pong-pytorch.py
Last active September 22, 2024 23:18 — forked from karpathy/pg-pong.py
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
import torch
import torch.nn as nn
import torch.optim as optim
import gym
import numpy as np
import pickle
# Hyperparameters
H = 200 # Number of hidden layer neurons
batch_size = 10 # Every how many episodes to do a param update?