In [1]:
import sys
if "../" not in sys.path:
sys.path.append("../")
import matplotlib
%matplotlib inline
matplotlib.style.use('ggplot')
from envs.windy_gridworld import WindyGridworldEnv
from utils import plotting
from sarsa import sarsa
# for auto-reloading external modules
# see http://stackoverflow.com/questions/1907993/autoreload-of-modules-in-ipython
%load_ext autoreload
%autoreload 2
In [2]:
env = WindyGridworldEnv()
In [3]:
Q, stats = sarsa(env, 200)
In [4]:
plotting.plot_episode_stats(stats)
Out[4]: