本文整理汇总了Python中plot.Plot.plot_multiple方法的典型用法代码示例。如果您正苦于以下问题:Python Plot.plot_multiple方法的具体用法?Python Plot.plot_multiple怎么用?Python Plot.plot_multiple使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类plot.Plot
的用法示例。
在下文中一共展示了Plot.plot_multiple方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from plot import Plot [as 别名]
# 或者: from plot.Plot import plot_multiple [as 别名]
epoch_list.append(range(num_learning_epochs))
avg_reward_list.append([])
for epoch in epoch_list[e]:
for trial in range(num_learning_trials):
qlearner.run_learning_trial()
avg_reward = 0
for trial in range(num_simulation_trials):
(total_reward, state_seq, action_seq) = qlearner.run_simulation_trial()
avg_reward += total_reward
avg_reward = 1.*avg_reward/num_simulation_trials
avg_reward_list[e].append(avg_reward)
print "MDP1 epoch {0}: {1}".format(epoch, avg_reward)
Plot.plot_multiple(epoch_list, avg_reward_list, [str(e) for e in epsilon_list], 'epsilon', 'MDP1 Learning: Epsilon', 'mdp1_epsilon_plot.png')
print
### PART III: MDP 1 alpha experiments
epsilon = 0.25
learning_rate_list = [0.001, 0.01, 0.1, 1.0]
epoch_list = []
avg_reward_list = []
for a, learning_rate in enumerate(learning_rate_list):
print "Alpha: {0}".format(learning_rate)
qlearner = QLearner(mdp1, initial_state1, epsilon=epsilon, alpha=learning_rate)
epoch_list.append(range(num_learning_epochs))