final checkpoint

This commit is contained in:
Christoffer Müller Madsen 2020-01-28 21:44:34 +01:00
parent 221e83abd7
commit 107ec1b766
2 changed files with 28 additions and 19 deletions

View File

@ -25,7 +25,7 @@ board_rep = "quack"
model_name = "quack_test_0_ply" model_name = "quack_test_0_ply"
run_stuff(board_rep, model_name) #run_stuff(board_rep, model_name)
#board_rep = "quack" #board_rep = "quack"
@ -42,7 +42,7 @@ board_rep = "quack-fat"
model_name = "quack-fat_test_0_ply" model_name = "quack-fat_test_0_ply"
run_stuff(board_rep, model_name) #run_stuff(board_rep, model_name)
#board_rep = "quack-fat" #board_rep = "quack-fat"
#model_name = "quack-fat_test_1_ply" #model_name = "quack-fat_test_1_ply"
@ -59,7 +59,7 @@ board_rep = "quack-norm"
model_name = "quack-norm_test_0_ply" model_name = "quack-norm_test_0_ply"
run_stuff(board_rep, model_name) #run_stuff(board_rep, model_name)
#board_rep = "quack-norm" #board_rep = "quack-norm"
#model_name = "quack-norm_test_1_ply" #model_name = "quack-norm_test_1_ply"
@ -73,7 +73,7 @@ run_stuff(board_rep, model_name)
board_rep = "tesauro" board_rep = "tesauro"
model_name = "tesauro_test_0_ply" model_name = "tesauro_test3_0_ply"
run_stuff(board_rep, model_name) run_stuff(board_rep, model_name)

37
plot.py
View File

@ -47,27 +47,36 @@ def dataframes(model_name):
if __name__ == '__main__': if __name__ == '__main__':
fig, ax = plt.subplots(1, 1) fig, (ax1, ax2) = plt.subplots(2, 1, sharex=True, sharey=True)
plt.ion() #plt.ion()
plt.title('Mean over episodes') ax1.set_title('Mean over episodes')
plt.xlabel('Episodes trained') ax2.set_xlabel('Episodes trained')
plt.ylabel('Mean') ax1.set_ylabel('Points-per-game')
plt.grid(True) ax1.grid(True)
ax2.grid(True)
#ax.set_xlim(left=0) #ax.set_xlim(left=0)
ax.set_ylim([-2, 2]) ax1.set_ylim([-2, 2])
plt.show() df = dataframes('tesauro-5')['eval']
while True:
df = dataframes('a')['eval']
print(df) print(df)
dumbeval_df = df.query("method == 'dumbeval'")
pubeval_df = df.query("method == 'pubeval'")
def plot_eval(axis, label, df, c):
x = df['eps_train'] x = df['eps_train']
y = df['mean'] y = df['mean']
plt.scatter(x, y, c=[[1, 0.5, 0]]) axis.scatter(x, y, label=label, c=c, marker="x")
#fig.canvas.draw()
plt.pause(2) plot_eval(ax1, "dumbeval", dumbeval_df, [[1, 0.5, 0]])
plot_eval(ax2, "pubeval", pubeval_df, [[0, 0.5, 1]])
ax1.legend()
ax2.legend()
plt.show()