docstr: Tests whether the simulator match the ground truth.
code: def test_simulator_fidelity(self):
      """Tests whether the simulator match the ground truth."""
  
      # Given an environment.
      env = catch.Catch()
  
      # If we instantiate a simulator 'model' of this environment.
      model = simulator.Simulator(env)
  
      # Then the model and environment should always agree as we step them.
      num_actions = env.action_spec().num_values
      for _ in range(10):
          true_timestep = env.reset()
          self.assertTrue(model.needs_reset)
          model_timestep = model.reset()
          self.assertFalse(model.needs_reset)
          self._check_equal(true_timestep, model_timestep)
  
          while not true_timestep.last():
              action = np.random.randint(num_actions)
              true_timestep = env.step(action)
              model_timestep = model.step(action)
              self._check_equal(true_timestep, model_timestep)
  
file_path: acme/acme/agents/tf/mcts/models/simulator_test.py
imports: from acme.agents.tf.mcts.models import simulator
  from bsuite.environments import catch
  import dm_env
  import numpy
  from absl.testing import absltest
label_desc: Use image node_id 2 for calling the SimulatorTest obj's underlying member method code with example usage: obj.test_simulator_fidelity() without return types