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
5 changes: 3 additions & 2 deletions bsuite/environments/deep_sea.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,12 @@ def _step(self, action: int) -> dm_env.TimeStep:
action_right = action == self._action_mapping[self._row, self._column]

# Reward calculation
if self._column == self._size - 1 and action_right:
if self._column == self._size - 1 and action_right \
and (self._rng.rand() > 1 / self._size or self._deterministic):
reward += 1.
self._denoised_return += 1.
if not self._deterministic: # Noisy rewards on the 'end' of chain.
if self._row == self._size - 1 and self._column in [0, self._size - 1]:
if self._row == self._size - 1 and 0 <= self._column <= self._size - 1:
reward += self._rng.randn()

# Transition dynamics
Expand Down