Open rhofour opened 7 years ago
This fixes #3
Instead of replacing MuJoCo, I think it would be better to have a flag to switch between them, in case some people want to use it (especially since MuJoCo licenses are now free for educational uses)
I was thinking it would be simpler this way and I didn't really see a need to preserve the MuJoCo environments. While the two aren't identical, for the purposes of this homework I think they both do just as well. However, if you think it's important to keep both I can refactor things a bit and put them back.
Yes, I think it's important to keep both. MuJoCo is currently the dominant choice for physics simulation at Berkeley, and thus the future instructors of the course will be most familiar with it, compared to Bullet. Thank you for your contribution!
It might take a little bit because mujoco-py doesn't want to install on my computer, but I can install an Ubuntu VM and hopefully then I'll be able to get the roboschool and mujoco environments to coexist.
@abhishekunique @jachiam might be able to help (e.g. by testing it), as they are TA'ing the course next semester.
Hey! Yes, can certainly take a look at this sometime this week.
Hey all,
I have a branch here: https://github.com/cuevasclemente/homework/tree/roboschool/hw1 that runs the Roboschool code, and as far as I can tell, it doesn't touch anything related to running the mujoco models. It does add an additional dependency, dill (along with adding a roboschool dependency) which I used just to keep the model files intact while pickling.
To do this I took the v0 models for the equivalent environments from roboschool, instantiated each of the models, and then used dill
to pickle those models. I have my hack around the existing code here (highlighted the pickling bit): https://github.com/cuevasclemente/roboschool/blob/pickle-experts/agent_zoo/RoboschoolHalfCheetah_v0_2017may.py#L289-L298
I can understand if you may be concerned about security issues for people uploading binaries so you can change the output directory on this line https://github.com/cuevasclemente/roboschool/blob/pickle-experts/agent_zoo/RoboschoolHalfCheetah_v0_2017may.py#L296 to where you want the dill-pickled files to go if you want to populate the pickles yourself or not use the pickles that I have uploaded on my branch.
After I've put the roboschool models in the file I run them like this:
$ ./run_expert.py experts/RoboschoolHalfCheetah-v1.pkl RoboschoolHalfCheetah-v1
It would take a bit of effort for me to get the MuJoCo code tested since I'm on a Mac, so I'm not really looking to do that, but if necessary I can try to get around to it.
Thank you for this @rhofour!!
I have added a pull request that replaces MuJoCo environments with Roboschool based on @rhofour pull request with additional:
Experts are replaced with policies from the Roboschool agent zoo. Some now unnecessary files are removed.