class_docstr: A dummy discrete pixel environment.
  
  It follows Atari game convention, where actions are 'NOOP', 'FIRE', ...
  It also contains self.unwrapped.ale.lives, get_action_meanings for testing.
  
  Several properties are made for testing purpose as following:
  
  -Observations are
      after reset    : np.ones(self._shape).
      action 1 (FIRE): np.full(self._shape, 2).
      otherwise      : random if self.random is True,
          otherwise previous state + action.
  
  -The environment has 5 lives.
  -Done will be True if
      -all 5 lives are exhausted
      -env.step(2), followed by env.step(1)
  
  Args:
      random (bool): Whether observations are generated randomly.
class_docstr_tok: ["A","dummy","discrete","pixel","environment",".","It","follows","Atari","game","convention",",","where","actions","are","'NOOP","'",",","'FIRE","'",",","...","It","also","contains","self.unwrapped.ale.lives",",","get_action_meanings","for","testing",".","Several","properties","are","made","for","testing","purpose","as","following",":","-Observations","are","after","reset",":","np.ones","(","self._shape",")",".","action","1","(","FIRE",")",":","np.full","(","self._shape",",","2",")",".","otherwise",":","random","if","self.random","is","True",",","otherwise","previous","state","+","action",".","-The","environment","has","5","lives",".","-Done","will","be","True","if","-all","5","lives","are","exhausted","-env.step","(","2",")",",","followed","by","env.step","(","1",")","Args",":","random","(","bool",")",":","Whether","observations","are","generated","randomly","."]
code: def __init__(self, random=True):
      super().__init__(random, obs_dim=(100, 100, 3), action_dim=5)
      self.unwrapped.get_action_meanings = self._get_action_meanings
      self.unwrapped.ale = mock.Mock()
      self.unwrapped.ale.lives = self.get_lives
      self._observation_space = akro.Box(
          low=0, high=255, shape=self._obs_dim, dtype=np.uint8
      )
      self.step_called = 0
      self._lives = None
      self._prev_action = None
  
file_path: garage/tests/fixtures/envs/dummy/dummy_discrete_pixel_env.py
imports: from unittest import mock
  import akro
  import numpy
  from garage import EnvSpec
  from tests.fixtures.envs.dummy import DummyEnv
label_desc: Use image node_id 1 to create a new DummyDiscretePixelEnv object from inherited base classes: DummyEnv with example: obj = DummyDiscretePixelEnv(random)