import numpy as np
from visdom import Visdom
viz = Visdom()
all_r = []


def clear_vis():
    del all_r[:]


def plot_r(r):
    title = 'One-Step AC - CartPole-v0'
    all_r.append(r)
    viz.line(X=np.arange(1, len(all_r) * 5 + 1, 5), Y=np.array(all_r), win=
        title, opts=dict(title=title, xlabel='Episode', ylabel=
        'Episode Reward'))

0bc78d1c4e43c80dc504fb41ef1869fba48cc6f0
<mask token>

<mask token>


def clear_vis():
    del all_r[:]


def plot_r(r):
    title = 'One-Step AC - CartPole-v0'
    all_r.append(r)
    viz.line(X=np.arange(1, len(all_r) * 5 + 1, 5), Y=np.array(all_r), win=
        title, opts=dict(title=title, xlabel='Episode', ylabel=
        'Episode Reward'))

<mask token>
viz = Visdom()
all_r = []


def clear_vis():
    del all_r[:]


def plot_r(r):
    title = 'One-Step AC - CartPole-v0'
    all_r.append(r)
    viz.line(X=np.arange(1, len(all_r) * 5 + 1, 5), Y=np.array(all_r), win=
        title, opts=dict(title=title, xlabel='Episode', ylabel=
        'Episode Reward'))

import numpy as np
from visdom import Visdom
viz = Visdom()
all_r = []


def clear_vis():
    del all_r[:]


def plot_r(r):
    title = 'One-Step AC - CartPole-v0'
    all_r.append(r)
    viz.line(X=np.arange(1, len(all_r) * 5 + 1, 5), Y=np.array(all_r), win=
        title, opts=dict(title=title, xlabel='Episode', ylabel=
        'Episode Reward'))
