q-learning

What is the difference between grid[index] VS grid[index, :] in python

What is the difference between grid[index] VS grid[index, :] in python Question: In this https://colab.research.google.com/drive/1gS2aJo711XJodqqPIVIbzgX1ktZzS8d8?usp=sharing , they used np.max(qtable[new_state, :]) But I did an experiment and I don’t understand the need of : . My experiement show the same value, same array shape import numpy as np N = 10 grid = np.array([[np.array(k) for i …

Total answers: 1

what does "IndexError: index 20 is out of bounds for axis 1 with size 20"

what does "IndexError: index 20 is out of bounds for axis 1 with size 20" Question: I was working on q learning in a maze environment, However, at the initial stage, it was working fine but afterward, I was getting the following max_future_q = np.max(q_table[new_discrete_state]) IndexError: index 20 is out of bounds for axis 1 …

Total answers: 3

How can I change this to use a q table for reinforcement learning

How can I change this to use a q table for reinforcement learning Question: I am working on learning q-tables and ran through a simple version which only used a 1-dimensional array to move forward and backward. now I am trying 4 direction movement and got stuck on controlling the person. I got the random …

Total answers: 1