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
#!/usr/bin/env python | |
from __future__ import print_function | |
import numpy as np | |
from sklearn.linear_model import ElasticNet, LinearRegression | |
import sys | |
# James McDermott (c) 2013 | |
# Hosted at https://gist.github.com/jmmcd/7790588 | |
# Requires Numpy and Scikit-learn |
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
"""from | |
https://gist.github.com/karpathy/a4166c7fe253700972fcbc77e4ea32c5 | |
http://karpathy.github.io/2016/05/31/rl/ | |
I've converted to Python 3, added command-line args, added slightly | |
more informative episode status message, allowed reloading of running | |
reward, episode number, and elapsed time, and switched off the | |
per-point status message -- jmmcd. |