Currently, the DiscretizedObservationWrapper does not include the outer space as bins. For example, if a temperature has bounds [21,24] degC and we discretize the observation space with n_bins_obs=3, the result will be an observation space defined by val_bins_obs=[21,22,23,24]. However, the temperature could go below or above the predefined bounds, in which case the returned observation will be incongruent. This issue is to add a boolean argument to the DiscretizedObservationWrapper named outs_are_bins to decide whether to include the outer observation spaces as bins or not. Following the example above, the intended behavior is the following:
If outs_are_bins=False, then the bins are defined by val_bins_obs=[21,22,23,24], but an error is raised when the observation goes out of bounds.
If outs_are_bins=True, then the bins are defined by val_bins_obs=[-inf,21,24,+inf].
Notice in both cases the observation space dimension equals n_bins_obs=3.
Currently, the
DiscretizedObservationWrapper
does not include the outer space as bins. For example, if a temperature has bounds [21,24] degC and we discretize the observation space withn_bins_obs=3
, the result will be an observation space defined byval_bins_obs=[21,22,23,24]
. However, the temperature could go below or above the predefined bounds, in which case the returned observation will be incongruent. This issue is to add a boolean argument to theDiscretizedObservationWrapper
namedouts_are_bins
to decide whether to include the outer observation spaces as bins or not. Following the example above, the intended behavior is the following:outs_are_bins=False
, then the bins are defined byval_bins_obs=[21,22,23,24]
, but an error is raised when the observation goes out of bounds.outs_are_bins=True
, then the bins are defined byval_bins_obs=[-inf,21,24,+inf]
.Notice in both cases the observation space dimension equals
n_bins_obs=3
.