Im trying to solve the Yatzee game once and forever using reinforcement learning. Sadly when i check the gyms conformity with stable baselines, it is critisizing the shape of my observation space. So ive put a print statement in the constructor thats telling me the shape of my observation space, as soon as i create an object.
class YatzeeEnv{
game_state = np.zeros(19, np.int32)
def __init__(self):
self.action_space = gym.spaces.Discrete(19)
self.observation_space = gym.spaces.MultiDiscrete(19)
for x in self.game_state_adresses:
self.game_state[x] = -1
self.reroll()
self.game_state[self.reroll_state] = 0
print(self.game_state.shape)
print(self.observation_space.shape)
}
a = YatzeeEnv()
Sadly the output of this is
np array shape: (19,)
Observation space shape: ()
Why is this? I thought gym.spaces.MultiDiscrete(19)
defines the observation space as int array with 19 values.