(self,
            num_times,
            board,
            agents,
            bombs,
            items,
            flames,
            is_partially_observable,
            agent_view_size,
            action_space,
            training_agent=None,
            is_communicative=False)
return steps, board, agents, bombs, items, flames, done, info
Run the forward model.

        Args:
          num_times: The number of times to run it for. This is a maximum and
            it will stop early if we reach a done.
          board: The board state to run it from.
          agents: The agents to use to run it.
          bombs: The starting bombs.
          items: The starting items.
          flames: The starting flames.
          is_partially_observable: Whether the board is partially observable or
            not. Only applies to TeamRadio.
          agent_view_size: If it's partially observable, then the size of the
            square that the agent can view.
          action_space: The actions that each agent can take.
          training_agent: The training agent to pass to done.
          is_communicative: Whether the action depends on communication
            observations as well.

        Returns:
          steps: The list of step results, which are each a dict of "obs",
            "next_obs", "reward", "action".
          board: Updated board.
          agents: Updated agents, same models though.
          bombs: Updated bombs.
          items: Updated items.
          flames: Updated flames.
          done: Whether we completed the game in these steps.
          info: The result of the game if it's completed.
Run the forward model.
Run the forward model .
def run(self,
            num_times,
            board,
            agents,
            bombs,
            items,
            flames,
            is_partially_observable,
            agent_view_size,
            action_space,
            training_agent=None,
            is_communicative=False):
        """Run the forward model.

        Args:
          num_times: The number of times to run it for. This is a maximum and
            it will stop early if we reach a done.
          board: The board state to run it from.
          agents: The agents to use to run it.
          bombs: The starting bombs.
          items: The starting items.
          flames: The starting flames.
          is_partially_observable: Whether the board is partially observable or
            not. Only applies to TeamRadio.
          agent_view_size: If it's partially observable, then the size of the
            square that the agent can view.
          action_space: The actions that each agent can take.
          training_agent: The training agent to pass to done.
          is_communicative: Whether the action depends on communication
            observations as well.

        Returns:
          steps: The list of step results, which are each a dict of "obs",
            "next_obs", "reward", "action".
          board: Updated board.
          agents: Updated agents, same models though.
          bombs: Updated bombs.
          items: Updated items.
          flames: Updated flames.
          done: Whether we completed the game in these steps.
          info: The result of the game if it's completed.
        """
        steps = []
        for _ in num_times:
            obs = self.get_observations(
                board, agents, bombs, is_partially_observable, agent_view_size)
            actions = self.act(
                agents, obs, action_space, is_communicative=is_communicative)
            board, agents, bombs, items, flames = self.step(
                actions, board, agents, bombs, items, flames)
            next_obs = self.get_observations(
                board, agents, bombs, is_partially_observable, agent_view_size)
            reward = self.get_rewards(agents, game_type, step_count, max_steps)
            done = self.get_done(agents, game_type, step_count, max_steps,
                                 training_agent)
            info = self.get_info(done, rewards, game_type, agents)

            steps.append({
                "obs": obs,
                "next_obs": next_obs,
                "reward": reward,
                "actions": actions,
            })
            if done:
                # Callback to let the agents know that the game has ended.
                for agent in agents:
                    agent.episode_end(reward[agent.agent_id])
                break
        return steps, board, agents, bombs, items, flames, done, info
def run ( self , num_times , board , agents , bombs , items , flames , is_partially_observable , agent_view_size , action_space , training_agent = None , is_communicative = False ) : steps = [ ] for _ in num_times : obs = self . get_observations ( board , agents , bombs , is_partially_observable , agent_view_size ) actions = self . act ( agents , obs , action_space , is_communicative = is_communicative ) board , agents , bombs , items , flames = self . step ( actions , board , agents , bombs , items , flames ) next_obs = self . get_observations ( board , agents , bombs , is_partially_observable , agent_view_size ) reward = self . get_rewards ( agents , game_type , step_count , max_steps ) done = self . get_done ( agents , game_type , step_count , max_steps , training_agent ) info = self . get_info ( done , rewards , game_type , agents ) steps . append ( { "obs" : obs , "next_obs" : next_obs , "reward" : reward , "actions" : actions , } ) if done : # Callback to let the agents know that the game has ended. for agent in agents : agent . episode_end ( reward [ agent . agent_id ] ) break return steps , board , agents , bombs , items , flames , done , info