Skip to content

Instantly share code, notes, and snippets.

View WesleyYue's full-sized avatar

Wesley WesleyYue

  • San Francisco, California
View GitHub Profile
@WesleyYue
WesleyYue / notebook.ipynb
Last active December 11, 2019 22:22
29736f4fa046c111d44ada71a0b1922e
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@WesleyYue
WesleyYue / lqr.py
Last active April 2, 2017 22:45 — forked from jeiting/lqr.py
Iterative LQR in OpenAI's CartPole Environment
#! /usr/local/bin/python3
import gym
import numpy as np
env = gym.make('CartPole-v0').env
x = env.reset()
# x, xdot, theta, thetadot
gamma = (4.0 / 3.0 - env.masspole / env.total_mass)