View hello_cartpole.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gym | |
import numpy as np | |
import matplotlib.pyplot as plt | |
class hello_cartpole: | |
def __init__(self): | |
self.env = gym.make('CartPole-v0') | |
self.env.reset() | |
def close(self): |
View taxi_q.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Following along sample from this page | |
# https://www.oreilly.com/learning/introduction-to-reinforcement-learning-and-openai-gym | |
# with a few modifications to look at what's going on under the hood. | |
import gym | |
import numpy as np | |
import matplotlib.pyplot as plt | |
env = gym.make("Taxi-v2") | |
env.reset() |
View neato_commander.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
import time | |
lf = b'\n' | |
eom = b'\x1a' | |
class NeatoCommander(): | |
def __init__(self, port="/dev/ttyACM1", timeout=1): | |
s = serial.Serial() |