Closed rbunn80110 closed 6 years ago
I think I figured it out, but let me know if I did it wrong somehow.
put this as an arg in main.py:
parser.add_argument(
'--render',
default=True,
metavar='R',
help='Watch game as it being played')
Then add this under the while True loop in train and test.py:
if args.render:
player.env.render()
After playing around with it, it appears that it works better when the code is added to test but not train.
Yup just like it in the gym_eval.py script that works. Yes if you want while while training just put in this the test not the train. That should be preferable too as too watch the train workers would slow down too much. If you really want to see a training agent just put the same code in train and get rid of test render and also make sure to specify only one worker to render. The environment can't handle multiprocessing and rendering game. Its a gym environment issue
I looked through all the arguments and I don't see one that allows you to watch the game being played while training. I guess I must be missing something really obvious. Great work by the way!