p-christ / Deep-Reinforcement-Learning-Algorithms-with-PyTorch

PyTorch implementations of deep reinforcement learning algorithms and environments
MIT License
5.64k stars 1.2k forks source link

Code lines missing in Mountain_Car.py #72

Open saketadhau opened 3 years ago

saketadhau commented 3 years ago

I tried to run the script from results/Mountain_Car.py, but I ran into an error,

Traceback (most recent call last):
  File "Mountain_Car.py", line 3, in <module>
    from agents.policy_gradient_agents.PPO import PPO
ModuleNotFoundError: No module named 'agents'

Fortunately, the problem can be solved by inserting the following lines

import sys
from os.path import dirname, abspath
sys.path.append(dirname(dirname(abspath(__file__))))

in the script Mountain_Car.py.