grid_world.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:mushroom 作者: carloderamo 项目源码 文件源码
def step(self, action):
        self._grid = self.convert_to_grid(self._state, *self._grid.shape)

        state = np.argwhere(self._grid == self._symbols['S']).ravel()

        new_state, reward, absorbing, info = self._step(state, action)

        if info['success']:
            self._grid[tuple(state)] = self._symbols['.']
            self._grid[tuple(new_state)] = self._symbols['S']

        self._state = self.convert_to_pixel(self._grid,
                                            self.window_size[1],
                                            self.window_size[0])

        return self._state, reward, absorbing, info
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号