3

I'm trying to create a custom environment for OpenAi Gym.

My observation space will have some values such as the following:

  • readings: 10x -1 to 1 continuous
  • count: 0 to 1000 discrete
  • on/off: 0 or 1 discrete

From the docs it seems I can create a Box with some low and high values or Discrete values or Tuples.

So if I create a Box with these 12 things (10 continuous, 2 discrete) and define it as a float32 will this still work ? or is there a better way ?

I have tried defining it as a Dict space, but it appears this is only for GoalEnv and has a very specific set of keys.

blissweb
  • 3,037
  • 3
  • 22
  • 33
  • Did you solved this? – Rexcirus Feb 02 '21 at 16:19
  • @Rexcirus Not to my satisfaction. In the end I used a Box with all floats. It did work. Using multiple types and tuples seems not possible at present. – blissweb Feb 03 '21 at 07:36
  • 1
    I also wanted to do this, but it appears that this is still subject of ongoing research (I found this paper which tries to combine discrete and continuous action spaces: https://arxiv.org/abs/2001.00449). I guess the greater problem would be that there are currently no algorithms (that I know of) which support Tuple or Dict spaces. – Philipp Apr 26 '21 at 13:07

0 Answers0