dm_control icon indicating copy to clipboard operation
dm_control copied to clipboard

How to know the physical meaning of each dimension of state space?

Open zdhNarsil opened this issue 3 years ago • 4 comments

I would like to write a wrapper for dm control environment and zero out some specific dimensions of the state. But I don't know the detailed physical meaning (i.e., position / velocity) of each individual dimension for each environment. I wonder where could I find these information?

zdhNarsil avatar Jul 28 '22 03:07 zdhNarsil

Right now, you're gonna have to look at the source code for each environment. I don't think it's particularly hard to parse but I do agree that it would be nice to have comments or a white-paper to describe each in detail :)

kevinzakka avatar Jul 29 '22 10:07 kevinzakka

@kevinzakka Hi Kevin, thanks for your reply! I have no idea where to look at in the source code (i.e., I cannot find the code corresponding to some specific environment), would you mind share any pointer as an example?

zdhNarsil avatar Jul 29 '22 21:07 zdhNarsil

What environments are you looking at? It will differ for the different suites in this repo.

  • For the dm_control suite, look at the *.py files defining each environment and check the observation dict. For example, acrobot.py
  • For the dm_control manipulation suite and locomotion suite, these are composer tasks so look at the __init__ function in each task definition and check what entity observable and task observables are defined. Usually the observations are returned as a dict so it's probably easier if you load the environment, step it and inspect the observation dict. But if you want to read code to learn more, look at the composer.Task definition and whatever composer.Entity is being used in the task.

Happy to answer more questions if you have any.

kevinzakka avatar Jul 30 '22 13:07 kevinzakka

@kevinzakka Yes, I mean dm_control suite.

In the *.py files you mentioned, there is a self.get_observation() function that returns a dict obs. But how does dm_control transform this python dict into a numpy array? I found this flatter_observation(), but I am not sure.

zdhNarsil avatar Jul 30 '22 15:07 zdhNarsil