summaryrefslogtreecommitdiff
path: root/qlearning.py
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-11-02 12:20:24 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-11-02 12:20:24 +0100
commitb7e71e66904082865bd18490335e15947f6fa218 (patch)
tree4d1b80316bba2aa1859a5a3b777d47758f1d4b3c /qlearning.py
parent657578547f60673e227a5e97833b137083e71c2d (diff)
Minor changes
Diffstat (limited to 'qlearning.py')
-rwxr-xr-xqlearning.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/qlearning.py b/qlearning.py
index 3c8111d..63ce70c 100755
--- a/qlearning.py
+++ b/qlearning.py
@@ -140,7 +140,7 @@ class QTable:
# Perform learning
-width,height=50,30
+width,height=10,10
perf=0
last_state=None
last_action=None
@@ -173,8 +173,9 @@ while True:
stuck=0
stuck_count+=1
action=qtable.get_random_action()
- print("Stuck!")
+ print("Stuck! Try a random action...")
if stuck_count>2:
+ print("Can't get out of stuck. Abort!")
stuck_count=0
game.new_game()
break