Skip to content

Commit

Permalink
Merge pull request awjuliani#47 from uoyssim/master
Browse files Browse the repository at this point in the history
change save file format from cptk to ckpt
  • Loading branch information
awjuliani authored Jul 19, 2017
2 parents ce99630 + 8e72b7e commit 2a96bfb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Double-Dueling-DQN.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
"y = .99 #Discount factor on the target Q-values\n",
"startE = 1 #Starting chance of random action\n",
"endE = 0.1 #Final chance of random action\n",
"anneling_steps = 10000. #How many steps of training to reduce startE to endE.\n",
"annealing_steps = 10000. #How many steps of training to reduce startE to endE.\n",
"num_episodes = 10000 #How many episodes of game environment to train network with.\n",
"pre_train_steps = 10000 #How many steps of random actions before training begins.\n",
"max_epLength = 50 #The max allowed length of our episode.\n",
Expand Down Expand Up @@ -360,7 +360,7 @@
"\n",
"#Set the rate of random action decrease. \n",
"e = startE\n",
"stepDrop = (startE - endE)/anneling_steps\n",
"stepDrop = (startE - endE)/annealing_steps\n",
"\n",
"#create lists to contain total rewards and steps per episode\n",
"jList = []\n",
Expand Down Expand Up @@ -427,11 +427,11 @@
" rList.append(rAll)\n",
" #Periodically save the model. \n",
" if i % 1000 == 0:\n",
" saver.save(sess,path+'/model-'+str(i)+'.cptk')\n",
" saver.save(sess,path+'/model-'+str(i)+'.ckpt')\n",
" print(\"Saved Model\")\n",
" if len(rList) % 10 == 0:\n",
" print(total_steps,np.mean(rList[-10:]), e)\n",
" saver.save(sess,path+'/model-'+str(i)+'.cptk')\n",
" saver.save(sess,path+'/model-'+str(i)+'.ckpt')\n",
"print(\"Percent of succesful episodes: \" + str(sum(rList)/num_episodes) + \"%\")"
]
},
Expand Down

0 comments on commit 2a96bfb

Please sign in to comment.