environment_matrix = [[None, 0], [-100, 0], [0, 0], [0, 0], [0, 0], [0, 100], [0, 0], [100, 0], [0, 0], [0, None]] As you can see, taking right from tile 5 and taking left from tile 7 have high reward of 100 as it leads to tile 6.
q_matrix = [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]] For starters lets assign all to zero.