健身房环境的观察空间能否同时拥有形象和其他价值?

问题描述

所以我有一个生成的迷宫让我们说(为简单起见)它是一个 10 x 10 大小的迷宫,以 200 x 200 RGB 像素表示。所以我知道,如果我只想拥有图像,那么它将是 Box(0.0,255.0,(200,200,3),float32) 但是我应该怎么做才能拥有值(在下面的代码显示)和图像?另外,在我的 step 函数中,我应该如何返回状态?

class MazeEnv(Env):
    def __init__(self):
        # Possible actions taken: Up,Down,Left,Right
        self.action_space = discrete(4)

        # low and high values for each states
        # Num    Observation                Min                     Max
        # 0      Agent Position X           -Inf                    Inf
        # 1      Agent Position Y           -Inf                    Inf
        # 2      Agent distance from goal X -Inf                    Inf
        # 3      Agent distance from goal X -Inf                    Inf
        # 4      IMAGE OF MAZE              ?                       ?
        
        high = np.array([np.finfo(np.float64).max,np.finfo(np.float64).max,np.finfo(np.float64).max],dtype=np.float64)
        self.observation_space = Box(low=-high,high=high,dtype=np.float64)

        # Current state of the agent
        self.stateX = 0
        self.stateY = 0

        # The amount of moves remaining for the agent
        self.movesRemaining = 120

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)