You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
HER is not working with environments that have a max step equal to 1. For example, on a modified version of BitFlipping where the agent can make only one action. The desired goal never changes on the "compute_reward()" method. I think it should use the achieved_goal sometimes as the desired one so it can compute a good reward and the agent can learn something. The behavior is ok with the default version of BitFlipping
Modified part of BitFlipping, the 'step' method always returns True as the 'done' variable
defstep(self, action):
ifself.continuous:
self.state[action>0] =1-self.state[action>0]
else:
self.state[action] =1-self.state[action]
obs=self._get_obs()
reward=self.compute_reward(obs['achieved_goal'], obs['desired_goal'], None)
done=reward==0self.current_step+=1# Episode terminate when we reached the goal or the max number of stepsinfo= {'is_success': done}
done=doneorself.current_step>=self.max_stepsreturnobs, reward, True, info
System Info
Describe the characteristic of your environment:
lib installed by pip
using CPU
python 3.6.8
tensorflow 1.14.1
gym 0.15.4
stable baselines 2.7.0
The text was updated successfully, but these errors were encountered:
Describe the bug
HER is not working with environments that have a max step equal to 1. For example, on a modified version of BitFlipping where the agent can make only one action. The desired goal never changes on the "compute_reward()" method. I think it should use the achieved_goal sometimes as the desired one so it can compute a good reward and the agent can learn something. The behavior is ok with the default version of BitFlipping
desired goal used
Code example
code to run
Modified part of BitFlipping, the 'step' method always returns True as the 'done' variable
System Info
Describe the characteristic of your environment:
The text was updated successfully, but these errors were encountered: