ikostrikov / pytorch-a3c

PyTorch implementation of Asynchronous Advantage Actor Critic (A3C) from "Asynchronous Methods for Deep Reinforcement Learning".
MIT License
1.23k stars 279 forks source link

The while True loop of function train? #65

Open machanic opened 5 years ago

machanic commented 5 years ago

The while True: of https://github.com/ikostrikov/pytorch-a3c/blob/master/train.py#L35 cannot be break, because the only break statement is in https://github.com/ikostrikov/pytorch-a3c/blob/master/train.py#L79 which is used to break for-loop: https://github.com/ikostrikov/pytorch-a3c/blob/master/train.py#L50 How to terminate that forever while-loop in your code?