Deep-Reinforcement-Learning-Algorithms-with-PyTorch icon indicating copy to clipboard operation
Deep-Reinforcement-Learning-Algorithms-with-PyTorch copied to clipboard

Updating setup info

Open simonalford42 opened this issue 6 years ago • 2 comments
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 pip before 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 BaseAgent to from agents.BaseAgent import BaseAgent.
  • I had to clone your nn_builder repository 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.

simonalford42 avatar Jun 12 '19 00:06 simonalford42

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.

vincehass avatar Feb 18 '22 19:02 vincehass

您好,邮件已收到。我查阅后,尽快回复您!

XiaoTailong avatar Feb 18 '22 19:02 XiaoTailong