def infer_action(self, raw_obs, ids, policy='e_greedy', eps=0):
        """infer action for a batch of agents

        Parameters
        ----------
        raw_obs: tuple(numpy array, numpy array)
            raw observation of agents tuple(views, features)
        ids: numpy array
            ids of agents
        policy: str
            can be eps-greedy or greedy
        eps: float
            used when policy is eps-greedy

        Returns
        -------
        acts: numpy array of int32
            actions for agents
        """
        view, feature = raw_obs[0], raw_obs[1]
        n = len(ids)

        states = self._get_agent_states(ids)
        qvalues, states = self.sess.run([self.qvalues, self.rnn_state], feed_dict={
            self.input_view:    view,
            self.input_feature: feature,
            self.state_in:      states,
            self.batch_size_ph: n,
            self.unroll_step_ph: 1
        })
        self._set_agent_states(ids, states)
        best_actions = np.argmax(qvalues, axis=1)

        if policy == 'e_greedy':
            random = np.random.randint(self.num_actions, size=(n,))
            cond = np.random.uniform(0, 1, size=(n,)) < eps
            ret = np.where(cond, random, best_actions)
        elif policy == 'greedy':
            ret = best_actions

        return ret.astype(np.int32)
infer action for a batch of agents

        Parameters
        ----------
        raw_obs: tuple(numpy array, numpy array)
            raw observation of agents tuple(views, features)
        ids: numpy array
            ids of agents
        policy: str
            can be eps-greedy or greedy
        eps: float
            used when policy is eps-greedy

        Returns
        -------
        acts: numpy array of int32
            actions for agents
        
python/magent/builtin/tf_model/drqn.py