#Snake game with Q-learning AI
4 messages · Page 1 of 1 (latest)
The game broke?
I mean one issue is that you're running the Q-learning loop without actually playing the game?
Yes, it gave an error message
action = select_action(state)
^^^^^^^^^^^^^^^^^^^^
File "c:\Users\jens4_1vw956y\OneDrive\vs code\Game Dev\snake.py", line 95, in select_action
return np.argmax(Q[state_index])
~^^^^^^^^^^^^^
IndexError: index 47 is out of bounds for axis 2 with size 4```