class_docstr: Implementation of the 3-arm T-Maze environment where there is an additional null outcome within the cue modality, so that the agent
  doesn't get a random cue observation, but a null one, when it visits non-cue locations
class_docstr_tok: ["Implementation","of","the","3-arm","T-Maze","environment","where","there","is","an","additional","null","outcome","within","the","cue","modality",",","so","that","the","agent","does","n't","get","a","random","cue","observation",",","but","a","null","one",",","when","it","visits","non-cue","locations"]
code: def __init__(self, reward_probs=None):
      if reward_probs is None:
          a = 0.98
          b = 1.0 - a
          self.reward_probs = [a, b]
      else:
          if sum(reward_probs) != 1:
              raise ValueError("Reward probabilities must sum to 1!")
          elif len(reward_probs) != 2:
              raise ValueError(
                  "Only two reward conditions currently supported..."
              )
          else:
              self.reward_probs = reward_probs
  
      self.num_states = [4, 2]
      self.num_locations = self.num_states[LOCATION_FACTOR_ID]
      self.num_controls = [self.num_locations, 1]
      self.num_reward_conditions = self.num_states[TRIAL_FACTOR_ID]
      self.num_cues = self.num_reward_conditions
      self.num_obs = [
          self.num_locations,
          self.num_reward_conditions + 1,
          self.num_cues + 1,
      ]
      self.num_factors = len(self.num_states)
      self.num_modalities = len(self.num_obs)
  
      self._transition_dist = self._construct_transition_dist()
      self._likelihood_dist = self._construct_likelihood_dist()
  
      self._reward_condition = None
      self._state = None
  
imports: from pymdp.envs import Env
  from pymdp import utils, maths
  import numpy
label_desc: Use image node_id 1 to create a new TMazeEnvNullOutcome object from inherited base classes: Env with example: obj = TMazeEnvNullOutcome(reward_probs)