Shmuma / ptan

PyTorch Agent Net: reinforcement learning toolkit for pytorch
MIT License
531 stars 165 forks source link

Reset the position of total_rewards and total_steps #48

Closed wangjunhe8127 closed 2 years ago

wangjunhe8127 commented 2 years ago

because of the use of yield,when we get the last state from history,we can not get the total_rewards and total_steps in previous code. We can get them together with reset the state,but it is the next episode.

So i 1、modify the code behind "if is_done: ..." 2、Considering that could have many simple in "history"

do this modify,please approve,thanks.