def _build_alone_inputs()

in src_code/controllers/basic_controller_interactive.py [0:0]


    def _build_alone_inputs(self, batch, t):
        # Assumes homogenous agents with flat observations.
        # Other MACs might want to e.g. delegate building inputs to each agent
        bs = batch.batch_size
        inputs_alone = []
        inputs_alone.append(batch["obs_alone"][:, t])  # b1av
        if self.args.obs_last_action:
            if t == 0:
                inputs_alone.append(th.zeros_like(batch["actions_onehot"][:, t]))
            else:
                inputs_alone.append(batch["actions_onehot"][:, t-1])
        if self.args.obs_agent_id:
            inputs_alone.append(th.eye(1, device=batch.device).expand(self.n_agents, -1).unsqueeze(0).expand(bs, -1, -1))

        inputs_alone = th.cat([x.reshape(bs*self.n_agents, -1) for x in inputs_alone], dim=1)
        return inputs_alone