base.py 文件源码

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

项目:gym-grid-world 作者: leomao 项目源码 文件源码
def configure(self, actions, frame_size, *, raw_array=False, max_step=-1):
        '''
        Usage:
            self.super()._configure(actions, frame_size)
        '''
        self.frame_size = frame_size
        self.raw_array = raw_array

        self.image = Image.new('RGB', self.frame_size, 'black')
        self.draw = ImageDraw.Draw(self.image)

        self.max_step = max_step
        self.step_cnt = 0

        self.actions = actions
        self.action_space = spaces.Discrete(len(actions))
        self.observation_space = spaces.Box(0., 255., (*self.frame_size, 3))
        self.__configured = True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号