In [1]:
import sys
if "../" not in sys.path:
  sys.path.append("../")

import matplotlib
%matplotlib inline
matplotlib.style.use('ggplot')

from envs.cliff_walking import CliffWalkingEnv
from utils import plotting

from double_q_learning import double_q_learning

# for auto-reloading external modules
# see http://stackoverflow.com/questions/1907993/autoreload-of-modules-in-ipython
%load_ext autoreload
%autoreload 2

In [2]:
env = CliffWalkingEnv()

In [3]:
Q1, Q2, stats = double_q_learning(env, 500)

In [4]:
plotting.plot_episode_stats(stats)


Out[4]:
(<matplotlib.figure.Figure at 0x1041827b8>,
 <matplotlib.figure.Figure at 0x10ee27390>,
 <matplotlib.figure.Figure at 0x10ef99b00>)

In [ ]: