Deep-Reinforcement-Learning-Algorithms-with-PyTorch
Deep-Reinforcement-Learning-Algorithms-with-PyTorch copied to clipboard
Updating setup info
trafficstars
Hello,
I tried cloning this repo to test out your CartPole agent. I had to go through a few extra steps to have a successful setup. I thought I would log what I did in case others need to go through the same process.
The problems I had were:
- to install the requirements in the conda directory I had to
conda install pipbefore installing the requirements. - there were also a few differences in installing the requirements I had to make. For example, instead of torch, I would install pytorch, of course.
- Importing wasn't working without including the subdirectories. So I had to rewrite all of the import statements including subdirectories, for example changing
from BaseAgent import BaseAgenttofrom agents.BaseAgent import BaseAgent. - I had to clone your
nn_builderrepository as well, then refactor the code to correctly import it - I got an error at line 111 of BaseAgent.py:
AttributeError: 'EnvSpec' object has no attribute 'trials'. To fix this I added another AttributeError exception and made 100 the backup value for the number of trials to avg over.
One way to fix the BaseAgent.py error : AttributeError: 'EnvSpec' object has no attribute 'trials' is by installing this version of gym: pip install gym==0.12.1.
您好,邮件已收到。我查阅后,尽快回复您!