def build_cooperation(self):
        plist = list(range(self.nplayers))
        cooperations = [[0 for opponent in plist] for player in plist]

        for player in plist:
            for opponent in plist:
                if player != opponent:
                    for rep in self.interactions:
                        coop_count = 0

                        if (player, opponent) in rep:
                            interactions = rep[(player, opponent)]
                            coop_count = iu.compute_cooperations(interactions)[0]
                        if (opponent, player) in rep:
                            interactions = rep[(opponent, player)]
                            coop_count = iu.compute_cooperations(interactions)[1]

                        cooperations[player][opponent] += coop_count
        return cooperations
Returns:
dataset/ETHPy150Open Axelrod-Python/Axelrod/axelrod/result_set.py/ResultSet.build_cooperation