Most of the installation procedure for dm_control
is listed in the official repository here. However some key points to take care of are:
-
Extract Mujoco pro in
~/.mujoco/
directory. The keymjkey.txt
you with get for Mujoco Pro 2.0 needs to be placed in thebin
directory to run Mujoco independently. A sanity check that Mujoco is installed correctly can be done by./simulate ../model/humanoid.xml
command (Linux and MacOS) by going into thebin
directory. Howeverdm_control
requires the key in the.mujoco
directory so place it there too. -
dm_control
can then be installed bypip
as stated in the repository or by cloning the repository and installing that bypip intall -e.
-
For rendering although the dependencies listed for linux are
libglfw3 libglew2.0
these might not work in that case usesudo apt-get install libglfw-dev libglew-dev
. These substitute dependencies work out. -
To test out
dm_control
try running the codetestdm.py
. If everything is installed correctly it will print out the reward, discount and observation of an episode for a simple cartpole task. Unlike gym after a step these three things are returned as a timestep object form which they can be accessed.
For training tasks in dm_control I recommend the tonic RL library that can be found here. The installation is pretty straight forward. The library provides with 2 variants of RL algorithms in Pytorch
as well as tensorflow
so it can be modified easily for research. Regarding how to train go to training folder of the repository.