diff options
Diffstat (limited to 'qlearning.py')
| -rwxr-xr-x | qlearning.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qlearning.py b/qlearning.py index 7fa9dbe..389db5a 100755 --- a/qlearning.py +++ b/qlearning.py @@ -32,7 +32,7 @@ qtable=np.zeros((2**13, 4)) -game=Snake(length=50,fps=200,startat=(10,10)) +game=Snake(length=1,fps=200,startat=(10,10)) def isWall(h,game): if h[0]<0 or h[1]<0 or h[0] >= game.grid_width or h[1] >= game.grid_height: @@ -97,7 +97,7 @@ def event_handler(game,event): reward=-10 attempt=0 elif event==1: - reward=1 + reward=5 attempt=0 # This come from me I do not now if it is the best way to identify a state |
