def step(self, action):
        possible_next_states = self.get_possible_next_states(self.state, action)

        probs = [x[1] for x in possible_next_states]
        next_state_idx = np.random.choice(len(probs), p=probs)
        next_state = possible_next_states[next_state_idx][0]

        next_x = next_state / self.n_col
        next_y = next_state % self.n_col

        next_state_type = self.desc[next_x, next_y]
        if next_state_type == 'H':
            done = True
            reward = 0
        elif next_state_type in ['F', 'S']:
            done = False
            reward = 0
        elif next_state_type == 'G':
            done = True
            reward = 1
        else:
            raise NotImplementedError
        self.state = next_state
        return Step(observation=self.state, reward=reward, done=done)
Fire a layout click event.
dataset/ETHPy150Open rllab/rllab/rllab/envs/grid_world_env.py/GridWorldEnv.step--crossover with--dataset/ETHPy150Open rwl/muntjac/muntjac/ui/abstract_layout.py/AbstractLayout.fireClick