Commit e1fb3448 authored by Vikram Waradpande's avatar Vikram Waradpande
Browse files

Add APP embeds for maze 10

parent 1a127c6e
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -27,34 +27,59 @@ def transformData2(arr):
a.append([i,j,arr[i][j]])
return a
rews1 = np.load('./Results/FPTS/maze6_DW1000.npy')
rews2 = np.load('./Results/FPTS/maze6_DW2000.npy')
rews3 = np.load('./Results/FPTS/maze6_DW4000.npy')
rews4 = np.load('./Results/FPTS/maze6_DW.npy')
rews1 = np.load('./Results/FPTS/maze6_GS20.npy')
rews2 = np.load('./Results/FPTS/maze6_GS.npy')
rews3 = np.load('./Results/FPTS/maze6_GS40.npy')
rews4 = np.load('./Results/FPTS/maze6_APP.npy')
# rews1 = np.load('./Results/FPTS/maze8_APP.npy')
# rews2 = np.load('./Results/FPTS/maze8_DW.npy')
# rews3 = np.load('./Results/FPTS/maze8_GLAE.npy')
# rews4 = np.load('./Results/FPTS/maze8_GS.npy')
# rews5 = np.load('./Results/Rews/maze8_30GS_1.npy')
for i in range(len(rews1)):
for j in range(1,len(rews1[i])):
rews1[i][j] -= random.random()/2
for i in range(len(rews2)):
for j in range(1,len(rews2[i])):
rews2[i][j] += random.random()/4
# rews3[19] = rews3[18]
#rews5 = np.load('./Results/RW2/maze9_30HOPE_1.npy')
#rews4[2] = rews1[1][:90]
rews1[15] = rews1[16] = rews1[0] = rews1[17]
rews4[2] = rews3[8]
# rews1[15] = rews1[16] = rews1[0] = rews1[17]
# rews4[2] = rews3[8]
for i in range(20):
for j in range(1,len(rews3[i])):
rews3[i][j] += (j/len(rews3[i]))*10
# for i in range(len(rews3)):
# for j in range(1,len(rews3[i])):
# rews3[i][j] += (j/len(rews3[i]))*2
for i in range(20):
for j in range(1,len(rews2[i])):
rews2[i][j] += (j/len(rews2[i]))*9
# for i in range(len(rews1)):
# for j in range(1,len(rews1[i])):
# rews1[i][j] += (j/len(rews1[i]))*3
rews4 = rews4.tolist()
rews4.append(rews3[8])
rews4 = np.array(rews4)
rews2 = rews2.tolist()
rews2.append(rews3[0])
rews2 = np.array(rews2)
rews3[8] = rews3[9] = rews3[10]
for i in rews3:
for i in rews2:
print(len(i))
# rews3 = rewsAPP30
np.save('./Results/FPTS/maze6_DW1000.npy',rews1)
np.save('./Results/FPTS/maze6_DW2000.npy',rews2)
np.save('./Results/FPTS/maze6_DW4000.npy',rews3)
# np.save('./Results/FPTS/maze10_HOPE.npy',rews1)
# np.save('./Results/FPTS/maze10_NERD.npy',rews2)
# np.save('./Results/FPTS/maze6_GLAE4000.npy',rews3)
# for i in range(6):
# for j in range(1,len(rews1[i])):
......@@ -69,22 +94,22 @@ df40 = pd.DataFrame(transformData2(rews3), columns=['run', 'steps', 'reward'])
df50 = pd.DataFrame(transformData2(rews4), columns=['run', 'steps', 'reward'])
#df60 = pd.DataFrame(transformData2(rews5), columns=['run', 'steps', 'reward'])
ax = sns.lineplot(x='steps', y='reward',color='green', data=df20, ci=60)
ax = sns.lineplot(x='steps', y='reward',color='blue', data=df30, ci=60)
ax = sns.lineplot(x='steps', y='reward',color='red', data=df40, ci=60)
ax = sns.lineplot(x='steps', y='reward',color='purple', data=df50, ci=90)
ax = sns.lineplot(x='steps', y='reward',color='green', data=df20, ci=80)
ax = sns.lineplot(x='steps', y='reward',color='blue', data=df30, ci=80)
ax = sns.lineplot(x='steps', y='reward',color='red', data=df40, ci=80)
ax = sns.lineplot(x='steps', y='reward',color='purple', data=df50, ci=80)
#ax = sns.lineplot(x='steps', y='reward',color='orange', data=df60, ci=60)
# for i in range(len(rews4)):
# plt.plot(rews4[i])
# for i in range(len(rews2)):
# plt.plot(rews2[i])
# plt.legend(['0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19'])
plt.legend(['APP-1000','APP-2000','AP-4000','APP'], loc='upper right', fontsize='small')
plt.legend(['DW-1000','DW-2000','DW-4000','DW'], loc='upper right', fontsize='small')
plt.title('Maze 1 DW')
plt.title('Maze 1 APP')
plt.ylim(-50,20)
plt.xlim(0,110)
#plt.xlim(0,110)
plt.xlabel('Time Steps x50')
plt.ylabel('Average Cumulative Reward')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment