Closed SBunce92 closed 5 years ago
Hi SBunce92, I have to apologize as the project is still under development and the repository is cluttered with past versions of the agent side. I've just updated the repo to encompass a hacked pytorch port of openAI's baselines repository (goodby A3C, hello ACKTR).
Pull the repo, then try something like: python3 main.py --algo acktr --model squeeze --log-dir trained_models/acktr --save-dir trained_models/acktr --map-width 27 --render --num-process 96
. In another terminal, python -m visdom.server
for live reward plots.
I'm constantly toying with model.py and encourage you to do the same. Let's see if we can efficiently tackle large map sizes. Or, tweak the step function in gym_micropolis/envs/env.py to reward the agent to incorporate net traffic into the agent's otherwise population-based reward function.
Great work on this project so far, looks really promising.
In trying to replicate model training, I have noticed the following error:
Traceback (most recent call last): File "main.py", line 179, in
shared_model = A3Clstm(env.observation_space.shape[0], env.action_space)
NameError: name 'A3Clstm' is not defined
I am assuming that this class is imported from model.py, as implemented by dgriff777 in https://github.com/dgriff777/rl_a3c_pytorch/blob/master/model.py
However by doing so I've got another error:
File "***/gym-micropolis/a3c/train.py", line 38, in train player = Agent(None, env, args, None) UnboundLocalError: local variable 'env' referenced before assignment
Maybe I'm just making a mistake somewhere. If you manage to replicate these errors, could you let me know a potential workaround?
Thanks