seungeunrho / minimalRL

Implementations of basic RL algorithms with minimal lines of codes! (pytorch based)
MIT License
2.87k stars 463 forks source link

Termination of a CartPole episode in REINFORCE.py #28

Closed ansari1375 closed 4 years ago

ansari1375 commented 4 years ago

Hi. I think REINFORCE.py:44 should be placed after REINFORCE.py:46. Because once a single episode is terminated, the value of "done" will be False (and won't be reset), causing the main function to skip the while loop in the subsequent episodes. After all, I'm not sure about this issue. I'm a total newbie. BTW, all of the implementations are highly efficient, easy-to-customize, easy-to-understand, and very helpful. Thank you for sharing.

seungeunrho commented 4 years ago

Fixed!!! Sorry!!!! and thankyou!!!