Error in Motecarlo Methods using gym_walk

Hi,

There is an error when using the gym_walk module:

user:~/catkin_ws/src/rl_course_files/fly_drone/scripts$ python mc_fvmc.py
[2022-10-26 13:18:20,470] Making new env: RandomWalk-v0
Traceback (most recent call last):
File “mc_fvmc.py”, line 188, in
env = gym.make(‘RandomWalk-v0’)
File “/usr/local/lib/python2.7/dist-packages/gym/envs/registration.py”, line 161, in make
return registry.make(id)
File “/usr/local/lib/python2.7/dist-packages/gym/envs/registration.py”, line 119, in make
env = spec.make()
File “/usr/local/lib/python2.7/dist-packages/gym/envs/registration.py”, line 85, in make
cls = load(self._entry_point)
File “/usr/local/lib/python2.7/dist-packages/gym/envs/registration.py”, line 17, in load
result = entry_point.load(False)
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py”, line 2443, in load
return self.resolve()
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py”, line 2449, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “/home/user/.local/lib/python2.7/site-packages/gym_walk/envs/init.py”, line 1, in
from gym_walk.envs.walk_env import WalkEnv
File “/home/user/.local/lib/python2.7/site-packages/gym_walk/envs/walk_env.py”, line 10, in
from gym.envs.toy_text.utils import categorical_sample
ImportError: No module named utils

I tried to search about this module into the gym_walk distribution but it apparently does not appear. I can not continue with the course because of this.

Could you help me please?

Regards,

Hi
Also, the excercise in section 4.5 where the FVMC is implemented does not work!!! Because the error in gym_walk.

Advice???

Hello @eblady ,

I was looking at this last Friday but couldn’t find a proper fix, Let me give it a 2nd look today and come back to you.