2

I build a custom Open AI Gym Environment that uses simple Tuple observation space.

self.observation_space = spaces.Tuple((spaces.Discrete(2,),spaces.Discrete(1)))

But when I try to use q-learning examples they use

observation_space.n

Is there a way to use q-learning with this kind of observation space?

Daniel Rojas
  • 407
  • 2
  • 5
  • 16

1 Answers1

0

Just came across the same issue in case anyone is still reading: As Tuple spaces don´t have an attribute n I used a workaround by simply defining it myself: self.observation_space.n = self.dimension1 * self.dimension2 basically multiplying the Discrete space input-parameters of the Tuple. Hope that makes sense

Seitanist
  • 76
  • 3