Vector Observation contents


Hi @arthurj

What information is now stored in the vector observation?

In v1.3 I think it was the remaining time and if the agent has a key or not.

Now it looks like that there are 8 values:

Vector Observation space size (per agent): 8


Judging by this function in obstacle_tower_env, the first six elements are for the number of keys (Perhaps one-hot? Not sure). Seventh is the time remaining and eight is the floor number, as in v1.3.


That is correct. We now provide the floor number as a vector observation, for those interested in using it for logging purposes, or for input to the agent itself.


I just printed the contents of the vector observation.
It has a shape of (4).
The first element is the visual observation (168, 168, 3).
The remaining items have a shape of () and hold the values key, time and current floor.

How does this relate to a vector observation size of 8.

Just to clarify, I’m on v2.0 and retro mode is disabled.

1 Like

Time and current floor each use one value, the other six are used by the key parameter.


So how is it possible that I only get 3 values for the vector observation and not 8?
Like said before I’m using the latest build and obstacle_tower_env.


Well I do see 8:
array([[1.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 2.99e+03, 0.00e+00]])

Maybe check the reset parameters?


I just upgraded to v2.1 and completely reinstalled my Python environment and the bug still exists.

Also, the value of the current floor is always equal to 0.

I observed this on windows and ubuntu.


Apologies if this sounds bit naive, but make sure you are importing the correct Python libraries. E.g. do you have file in the directory from which you run the experiments?

You can find the imported file with the following:

In [1]: import obstacle_tower_env                                                                                                                           

In [2]: obstacle_tower_env.__file__                                                                                                                         
Out[2]: '/home/USERNAME/.local/lib/python3.5/site-packages/'

If everything else is correct, possibly a windows issue- I’m using ubuntu 16.04 btw


I checked the path of and replaced the file with the one from the repository.
Same issue.

I tested this on two Ubuntu and two Windows machines. All have the same behavior.


Hi,@arthurj the obs[0:6] is the observation of keys, but my question is how does it relate to the number of keys?

I check the obs value in debug mode, even when I haven’t got any key the value is [1,0,0,0,0,0]


Looking at how ObstacleTowerEnv handles this observation, the vector tells number of keys as one-hot encoding (or with 1s up till number of keys, e.g. two keys would be [1,1,1,0,0,0]). So [1,0,0,0,0,0] means zero keys.


So this means in higher floor, there might be two keys and either of the keys can be used interchangeably?

Another question, why doesn’t just use 1 value to pass observation like [2] for two keys?


Does anybody have any idea on how to debug my issue?