@@ -82,7 +82,7 @@ def action(self, act):
82
82
# ------------------------------------------------
83
83
# Reward wrappers are used to transform the reward that is returned by an environment.
84
84
# As for the previous wrappers, you need to specify that transformation by implementing the
85
- # :meth:`gymnasium.RewardWrapper.reward` method. Also, you might want to update the reward range of the wrapper.
85
+ # :meth:`gymnasium.RewardWrapper.reward` method.
86
86
#
87
87
# Let us look at an example: Sometimes (especially when we do not have control over the reward
88
88
# because it is intrinsic), we want to clip the reward to a range to gain some numerical stability.
@@ -96,7 +96,6 @@ def __init__(self, env, min_reward, max_reward):
96
96
super ().__init__ (env )
97
97
self .min_reward = min_reward
98
98
self .max_reward = max_reward
99
- self .reward_range = (min_reward , max_reward )
100
99
101
100
def reward (self , r : SupportsFloat ) -> SupportsFloat :
102
101
return np .clip (r , self .min_reward , self .max_reward )
@@ -110,7 +109,7 @@ def reward(self, r: SupportsFloat) -> SupportsFloat:
110
109
# Such wrappers can be implemented by inheriting from :class:`gymnasium.Wrapper`.
111
110
#
112
111
# - You can set a new action or observation space by defining ``self.action_space`` or ``self.observation_space`` in ``__init__``, respectively
113
- # - You can set new metadata and reward range by defining ``self.metadata`` and ``self.reward_range`` in ``__init__``, respectively
112
+ # - You can set new metadata by defining ``self.metadata`` in ``__init__``
114
113
# - You can override :meth:`gymnasium.Wrapper.step`, :meth:`gymnasium.Wrapper.render`, :meth:`gymnasium.Wrapper.close` etc.
115
114
#
116
115
# If you do this, you can access the environment that was passed
0 commit comments