relay_env.py 文件源码

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

项目:relay-generator 作者: calclavia 项目源码 文件源码
def __init__(self, dim=(14, 9)):
        self.dim = dim
        self.size = dim[0] * dim[1]
        self.max_blocks_per_turn = min(dim)
        self.target_difficulty = None
        self.target_pos = None

        # Observe the world
        self.observation_space = spaces.Tuple((
            spaces.Box(0, num_block_type, shape=dim),
            spaces.Box(np.array([0, 0]), np.array(dim)),
            spaces.Discrete(num_directions),
            spaces.Box(0, 1, shape=(1))
        ))

        # Actions allow the world to be populated.
        self.action_space = spaces.Discrete(num_actions)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号