class_docstr: States: {0, 1, ..., 9, 10}
  Actions: {-1, 0, 1}
  Action masking: action = -1 invalid for state = 0, action = 1 invalid for state = 10
  Reward:
      - Positive: [state < 5, action = 1] or [state > 5, action = -1]
      - Negative: [state < 5, action = -1] or [state > 5, action = 1]
code: def reset(self):
      # Initial state and associated action mask
      self.state = np.random.randint(3, 7)
      action_mask = np.asarray([self.state > 0, True, self.state < 10])
  
      # Add action mask to states dictionary (mask item is "[NAME]_mask", here "action_mask")
      states = dict(state=self.state, action_mask=action_mask)
  
      return states
  
file_path: tensorforce/examples/action_masking.py
imports: import numpy
  from tensorforce import Environment, Runner
label_desc: Use image node_id 4 for calling the EnvironmentWithMasking obj's underlying member method code with example usage: obj.reset() and returns: states