atarienv.py 文件源码

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

项目:deepatari 作者: cowhi 项目源码 文件源码
def step(self, action):
        """ Perform an action and observe the resulting state.

        Args:
            action (int): Selected action ID to perform in envirnoment.

        Returns:
            reward (float): The change of score after performing the action.

        """
        _logger.debug("Getting index of action %s" % (str(action)))
        action = np.where(self.avail_actions == action)[0][0]
        self.current_frame, reward, self.terminal_state, info = self.gym.step(action)
        self.current_frame = cv2.resize(cv2.cvtColor(self.current_frame, cv2.COLOR_RGB2GRAY), self.frame_dims)
        if self.counts_lives:
            self.just_lost_live = self.has_just_lost_live()
        return reward
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号