def __move(self, state, action):
    ' Makes a step in the town_map, given a current position and an action.\n            If the action STAY or an inadmissible action is used, the robber stays in place.\n\n            :return integer next_cell corresponding to position (x,y) x (x,y) on the town_map that agent transitions to.\n        '
    row = (self.states[state][0] + self.actions[action][0])
    col = (self.states[state][1] + self.actions[action][1])
    hitting_town_walls = ((row == (- 1)) or (row == self.town_map.shape[0]) or (col == (- 1)) or (col == self.town_map.shape[1]))
    list_police_pos = self.__police_positions(state)
    new_police_pos = list_police_pos[np.random.randint(len(list_police_pos))]
    caught = all((self.states[state][0:2] == self.states[state][2:]))
    if caught:
        return self.map[tuple(self.initial_state)]
    elif hitting_town_walls:
        return state
    else:
        return self.map[(row, col, new_police_pos[0], new_police_pos[1])]
Makes a step in the town_map, given a current position and an action.
If the action STAY or an inadmissible action is used, the robber stays in place.

:return integer next_cell corresponding to position (x,y) x (x,y) on the town_map that agent transitions to.
def __move(self, state, action):
    ' Makes a step in the town_map, given a current position and an action.\n            If the action STAY or an inadmissible action is used, the robber stays in place.\n\n            :return integer next_cell corresponding to position (x,y) x (x,y) on the town_map that agent transitions to.\n        '
    row = (self.states[state][0] + self.actions[action][0])
    col = (self.states[state][1] + self.actions[action][1])
    hitting_town_walls = ((row == (- 1)) or (row == self.town_map.shape[0]) or (col == (- 1)) or (col == self.town_map.shape[1]))
    list_police_pos = self.__police_positions(state)
    new_police_pos = list_police_pos[np.random.randint(len(list_police_pos))]
    caught = all((self.states[state][0:2] == self.states[state][2:]))
    if caught:
        return self.map[tuple(self.initial_state)]
    elif hitting_town_walls:
        return state
    else:
        return self.map[(row, col, new_police_pos[0], new_police_pos[1])]