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
评论列表
文章目录