Skip to content

Instantly share code, notes, and snippets.

View xanderex-sid's full-sized avatar
🎯
Focusing

Siddharth Mishra xanderex-sid

🎯
Focusing
View GitHub Profile
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2016 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
@xanderex-sid
xanderex-sid / pgRL-pong.py
Created September 23, 2024 17:02
PyTorch - Training a NN Pong agent with Policy Gradients from raw pixels
import pickle
import numpy as np
import torch
import gym
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim