def possibleActionsPerAgent(self, s_i):
        """
        Returns all possible actions for a single (2-D) agent state *s_i* 
        (where the domain state s = [s_0, ... s_i ... s_NUMBER_OF_AGENTS])
        
            1. tile the [R,C] for all actions
            2. add all actions to the results
            3. Find feasible rows and add them as possible actions
            
        """
        tile_s = np.tile(s_i, [len(self.ACTIONS_PER_AGENT), 1])
        next_states = tile_s + self.ACTIONS_PER_AGENT
        next_states_rows = next_states[:, 0]
        next_states_cols = next_states[:, 1]
        possibleActions1 = np.logical_and(
            0 <= next_states_rows,
            next_states_rows < self.ROWS)
        possibleActions2 = np.logical_and(
            0 <= next_states_cols,
            next_states_cols < self.COLS)
        possibleActions, _ = np.logical_and(
            possibleActions1, possibleActions2).reshape(-1, 1).nonzero()
        return possibleActions
dataset/ETHPy150Open rlpy/rlpy/rlpy/Domains/IntruderMonitoring.py/IntruderMonitoring.possibleActionsPerAgent/original