Skip to content

Instantly share code, notes, and snippets.

View dhruvramani's full-sized avatar
👾

Dhruv Ramani dhruvramani

👾
View GitHub Profile
@dhruvramani
dhruvramani / cartpole_pg.py
Created April 2, 2019 02:59 — forked from shanest/cartpole_pg.py
Policy gradients for reinforcement learning in TensorFlow (OpenAI gym CartPole environment)
#!/usr/bin/env python
import gym
import numpy as np
import tensorflow as tf
class PolicyGradientAgent(object):
def __init__(self, hparams, sess):