def visualize_b(state_action_partition): vis_utils.plot_background(env, show=False) vis_utils.plot_decision_boundary(g, env.STATE_ACTION_MAP.shape[1], env.STATE_ACTION_MAP.shape[0], show=False) vis_utils.plot_state_action_partition(state_action_partition, show=True)
def visualize_b(state_action_partition): vis_utils.plot_background(env, show=False) xx, yy = np.meshgrid(np.arange(0, env.STATE_ACTION_MAP.shape[1], 0.01), np.arange(0, env.STATE_ACTION_MAP.shape[0], 0.01)) data = np.c_[xx.ravel(), yy.ravel()] Z = g.batch_predict(data[:, 0], data[:, 1]) Z = np.array(Z).reshape(xx.shape) plt.contourf(xx, yy, Z, alpha=0.4) vis_utils.plot_state_action_partition(state_action_partition, show=True)
def visualize_b(state_action_partition): vis_utils.plot_background(env, show=False) vis_utils.plot_state_action_partition(state_action_partition, show=True)
def visualize_ignored(states): vis_utils.plot_background(env, show=False) plt.hist(states, bins=10, range=[0, len(env.STATE_MAP)], normed=True) plt.show()