In case of constant input x, the min_max_scale function can return unbounded values x.
If abs(x) >> 1, this can lead to fully saturated outputs of learning agents (such that the outcome of learning is predetermined by the seed).
# Avoid division by zero
if min_val == max_val:
return x
return (x - min_val) / (max_val - min_val)
In case of constant input x, the min_max_scale function can return unbounded values x.
If abs(x) >> 1, this can lead to fully saturated outputs of learning agents (such that the outcome of learning is predetermined by the seed).