diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-11-01 23:40:05 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-11-01 23:40:05 +0100 |
| commit | 59ed0cdf7326854f97b6f90c6afcbe20c480e400 (patch) | |
| tree | ba7130f9d5d508e518b78fab763420100cca8ac3 /qlearning.py | |
| parent | 48d8b7bfd5021cc627b8f55c8a1c8ffc40aa6b2f (diff) | |
Minor changes
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 |
