gym_gazebo_kinetic icon indicating copy to clipboard operation
gym_gazebo_kinetic copied to clipboard

learning stop in the middle of training

Open yani-rl-ai opened this issue 4 years ago • 2 comments

yani-rl-ai avatar Jun 30 '20 01:06 yani-rl-ai

Hi @zhaolongkzz, i got this following error EP: 912 - [alpha: 0.2 - gamma: 0.8 - epsilon: 0.25] - Reward: 185 Time: 0:52:56 EP: 913 - [alpha: 0.2 - gamma: 0.8 - epsilon: 0.25] - Reward: 4312 Time: 0:53:42 Traceback (most recent call last): File "circuit2_turtlebot_lidar_qlearn.py", line 49, in observation = env.reset() File "/usr/local/lib/python2.7/dist-packages/gym/wrappers/monitor.py", line 37, in reset self._before_reset() File "/usr/local/lib/python2.7/dist-packages/gym/wrappers/monitor.py", line 180, in _before_reset self.stats_recorder.before_reset() File "/usr/local/lib/python2.7/dist-packages/gym/wrappers/monitoring/stats_recorder.py", line 68, in before_reset raise error.Error("Tried to reset environment which is not done. While the monitor is active for {}, you cannot call reset() unless the episode is over.".format(self.env_id)) gym.error.Error: Tried to reset environment which is not done. While the monitor is active for GazeboCircuit2TurtlebotLidar-v0, you cannot call reset() unless the episode is over.

do you know how to solve this error? this error always occurred around 1000 episde

yani-rl-ai avatar Jun 30 '20 01:06 yani-rl-ai

The ending episode is earlier than the max steps, so the monitor function of the gym gets wrong. Best to use while True and if done: break instead of giving a range for loops.

zhaolongkzz avatar Jul 02 '20 07:07 zhaolongkzz