Skip to content

Instantly share code, notes, and snippets.

View DollarAkshay's full-sized avatar
🖥️
Coding

Akshay.L.Aradhya DollarAkshay

🖥️
Coding
  • Bangalore
View GitHub Profile
@DollarAkshay
DollarAkshay / OpenAI_Acrobot_v1.py
Last active December 20, 2016 07:58
Acrobot v1 using Genetic Algorithm and Neural Netowks
import time, math, random, bisect, copy
import gym
import numpy as np
class NeuralNet :
def __init__(self, nodeCount):
self.fitness = 0
self.nodeCount = nodeCount
@DollarAkshay
DollarAkshay / OpenAI_CartPole_v0.py
Last active December 20, 2016 07:58
CartPole v0 using Genetic Algorithm and Neural Netowks
import time, math, random, bisect
import gym
import numpy as np
def sigmoid(x):
return 1.0/(1.0 + np.exp(-x))
class NeuralNet :
def __init__(self, nodeCount):
@DollarAkshay
DollarAkshay / OpenAI_CartPole_v1.py
Created December 20, 2016 07:57
CartPole v1 using Genetic Algorithm and Neural Netowks
import time, math, random, bisect
import gym
import numpy as np
def sigmoid(x):
return 1.0/(1.0 + np.exp(-x))
class NeuralNet :
def __init__(self, nodeCount):
@DollarAkshay
DollarAkshay / OpenAI_CartPole_v0.py
Created December 20, 2016 09:27
CartPole v0 using Genetic Algorithm and Neural Netowks
import time, math, random, bisect
import gym
import numpy as np
def sigmoid(x):
return 1.0/(1.0 + np.exp(-x))
class NeuralNet :
def __init__(self, nodeCount):
@DollarAkshay
DollarAkshay / OpenAI_LunarLander_v2.py
Created December 21, 2016 01:55
Solving Lunar Lander using Genetic Algorithms
import time, math, random, bisect, copy
import gym
import numpy as np
class NeuralNet :
def __init__(self, nodeCount):
self.fitness = 0.0
self.nodeCount = nodeCount
@DollarAkshay
DollarAkshay / OpenAI_CartPole_v0.py
Created December 21, 2016 15:52
CartPole v0 using Genetic Algorithm and Neural Netowks
import time, math, random, bisect
import gym
import numpy as np
def sigmoid(x):
return 1.0/(1.0 + np.exp(-x))
class NeuralNet :
def __init__(self, nodeCount):
@DollarAkshay
DollarAkshay / #Plain Text.md
Last active February 28, 2020 15:43
Solving BipedalWalker v2 using Genetic Algorithm and Neural Networks
@DollarAkshay
DollarAkshay / OpenAI_FrozenLake_v0.py
Created December 22, 2016 14:02
Solving FrozenLake v0 using Q Learning Algorithm
import time, random, math
import numpy as np
import gym
def uploadSimulation():
API_KEY = open('/home/dollarakshay/Documents/API Keys/Open AI Key.txt', 'r').read().rstrip()
gym.upload('Artificial Intelligence/'+GAME, api_key=API_KEY)
def updateQTable(prevState, prevAction, reward, curState):
@DollarAkshay
DollarAkshay / OpenAI_Taxi_v1.py
Created December 22, 2016 14:57
Solving Taxi v1 using Q Learning Algorithm
import time, random, math
import numpy as np
import gym
def uploadSimulation():
API_KEY = open('/home/dollarakshay/Documents/API Keys/Open AI Key.txt', 'r').read().rstrip()
gym.upload('Artificial Intelligence/'+GAME, api_key=API_KEY)
def updateQTable(prevState, prevAction, reward, curState):
@DollarAkshay
DollarAkshay / OpenAI_Taxi_v1.py
Created December 22, 2016 14:58
Solving Taxi v1 using Q Learning Algorithm
import time, random, math
import numpy as np
import gym
def uploadSimulation():
API_KEY = open('/home/dollarakshay/Documents/API Keys/Open AI Key.txt', 'r').read().rstrip()
gym.upload('Artificial Intelligence/'+GAME, api_key=API_KEY)
def updateQTable(prevState, prevAction, reward, curState):