class_docstr: We use this class to generate batches of experiences
  
  __init__:
  - Initialize the runner
  
  run():
  - Make a mini batch of experiences
class_docstr_tok: ["We","use","this","class","to","generate","batches","of","experiences","__init__",":","-","Initialize","the","runner","run","(",")",":","-","Make","a","mini","batch","of","experiences"]
code: def __init__(self, env, model, nsteps=5, gamma=0.99):
      super().__init__(env=env, model=model, nsteps=nsteps)
      self.gamma = gamma
      self.batch_action_shape = [
          x if x is not None else -1
          for x in model.train_model.action.shape.as_list()
      ]
      self.ob_dtype = model.train_model.X.dtype.as_numpy_dtype
  
imports: import numpy
  from baselines.a2c.utils import discount_with_dones
  from baselines.common.runners import AbstractEnvRunner
label_desc: Use image node_id 1 to create a new Runner object from inherited base classes: AbstractEnvRunner with example: obj = Runner(env, model, nsteps, gamma)