summaryrefslogtreecommitdiff
path: root/qlearning.py
diff options
context:
space:
mode:
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