class_docstr: Simple bit flipping env, useful to test HER.
  The goal is to flip all the bits to get a vector of ones.
  In the continuous variant, if the ith action component has a value > 0,
  then the ith bit will be flipped.
  
  :param n_bits: (int) Number of bits to flip
  :param continuous: (bool) Whether to use the continuous actions version or not,
      by default, it uses the discrete one
  :param max_steps: (int) Max number of steps, by default, equal to n_bits
  :param discrete_obs_space: (bool) Whether to use the discrete observation
      version or not, by default, it uses the MultiBinary one
class_docstr_tok: ["Simple","bit","flipping","env",",","useful","to","test","HER",".","The","goal","is","to","flip","all","the","bits","to","get","a","vector","of","ones",".","In","the","continuous","variant",",","if","the","ith","action","component","has","a","value",">","0",",","then","the","ith","bit","will","be","flipped",".",":","param","n_bits",":","(","int",")","Number","of","bits","to","flip",":","param","continuous",":","(","bool",")","Whether","to","use","the","continuous","actions","version","or","not",",","by","default",",","it","uses","the","discrete","one",":","param","max_steps",":","(","int",")","Max","number","of","steps",",","by","default",",","equal","to","n_bits",":","param","discrete_obs_space",":","(","bool",")","Whether","to","use","the","discrete","observation","version","or","not",",","by","default",",","it","uses","the","MultiBinary","one"]
code: def compute_reward(
      self, achieved_goal: np.ndarray, desired_goal: np.ndarray, _info
  ) -> float:
      # Deceptive reward: it is positive only when the goal is achieved
      if self.discrete_obs_space:
          return 0.0 if achieved_goal == desired_goal else -1.0
      return 0.0 if (achieved_goal == desired_goal).all() else -1.0
  
file_path: stable-baselines/stable_baselines/common/bit_flipping_env.py
imports: from collections import OrderedDict
  import numpy
  from gym import GoalEnv, spaces
label_desc: Use image node_id 6 for calling the BitFlippingEnv obj's underlying member method code with example usage: obj.compute_reward(achieved_goal, desired_goal, _info) and returns: unknown, unknown