Skip to content

Instantly share code, notes, and snippets.

View siddharthanpr's full-sized avatar
🏠
Working from home.

Siddharthan siddharthanpr

🏠
Working from home.
View GitHub Profile
@siddharthanpr
siddharthanpr / Evolutionary Strategy
Last active May 24, 2017 21:42
Implementation of ES - a scalable alternative to RL
## Continous cart pole using evolutionary strategy (ES)
## This is an implementation of the paper https://arxiv.org/pdf/1703.03864.pdf
## Running this script should do the trick
import gym
import numpy as np
from gym import wrappers
env = gym.make('InvertedPendulum-v1')
env = wrappers.Monitor(env, '/home/sid/ccp_pg', force= True)
# Continuous cart pole using policy gradients (PG)
# Running this script does the trick!
import gym
import numpy as np
from gym import wrappers
env = gym.make('InvertedPendulum-v1')
env = wrappers.Monitor(env, '/home/sid/ccp_pg', force= True)
# Continuous cart pole using policy gradients (PG)
# Running this script does the trick!
import gym
import numpy as np
from gym import wrappers
env = gym.make('InvertedPendulum-v1')
env = wrappers.Monitor(env, '/home/sid/ccp_pg', force= True)
@siddharthanpr
siddharthanpr / Policy gradient.
Created May 20, 2017 20:24
The following uses simple vannila REINFORCE algorithm with average reward as baseline b
# Continuous cart pole using policy gradients (PG)
# Running this script does the trick!
import gym
import numpy as np
from gym import wrappers
env = gym.make('InvertedPendulum-v1')
env = wrappers.Monitor(env, '/home/sid/ccp_pg', force= True)