Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions agentenv-babyai/agentenv_babyai/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ def update(self, action, obs, reward, done, infos): # update the environment aft
else:
self.reward = reward

if self.done: # in case the model find a way to skip a step
if self.reward <= 0.5:
self.done = False
# if self.done: # in case the model find a way to skip a step
# if self.reward <= 0.5:
# self.done = False

if self.reward == 1 and not self.done: # if the agent has already reached the goal, but the task is not completed, we fix the error.
self.done = True
Expand Down