diff options
author | Florian Jung <flo@windfisch.org> | 2016-02-03 18:09:19 +0100 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2016-02-03 18:09:19 +0100 |
commit | f0ebbd21a6ab27e4b97d03a19e06b01eb9a2114a (patch) | |
tree | 977ab3908ee04781832fe751fd71cc7d5c302c15 | |
parent | d8b98f347d0858128074054dea583772692365d0 (diff) |
proper frameskip for NN
-rw-r--r-- | sol.py | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -21,7 +21,8 @@ alpha_reduction = 0.9998 friendlyness = 0.7 # probability that the model actually performs the action we've requested. # the model will perform a random other actions with probability of (1-friendlyness)/3. # putting 0.25 here will make it just random. -frameskip = 99 +frameskip_array = 99 +frameskip_nn = 0 visu = True @@ -72,7 +73,8 @@ if arg['-h']: " nn -> neural network representation\n" + " default: array" + " --frameskip NUM # frameskip for visualisation\n" + - " # default: %f\n" % frameskip + + " # default: %f for --qfunc array\n" % frameskip_array + + " # %f for --qfunc nn\n" % frameskip_nn + " --sleep # sleep after every <frameskip> frames\n"+ " --quiet # disable visualisation\n" + " --file FILE # output file for q learning") @@ -87,7 +89,7 @@ if arg['--sleep']: do_sleep = True if arg['--frameskip']: - frameskip = int(arg['--frameskip']) + frameskip_array=frameskip_nn = int(arg['--frameskip']) if arg['--episodes']: n_episodes = int(arg['--episodes']) @@ -354,8 +356,10 @@ a = World(maze, start) Q = None if arg['--qfunc'] == "nn": Q = QNN() + frameskip = frameskip_nn else: Q = QArray() + frameskip = frameskip_array i=0 stopstate = -1 |