def strategy(self, opponent):
        """
        A random player is unpredictable, which means the conditional frequency
        of cooperation after cooperation, and defection after defections, should
        be close to 50%... although how close is debatable.
        """
        # Update counts
        if len(self.history) > 1:
            if self.history[-2] == C and opponent.history[-1] == C:
                self.countCC += 1
            if self.history[-2] == D and opponent.history[-1] == D:
                self.countDD += 1

        n = len(self.history)
        if 10 > n:
            probabilities = []
            if self.cooperations > 5:
                probabilities.append(1.0 * self.countCC / self.cooperations)
            if self.defections > 5:
                probabilities.append(1.0 * self.countDD / self.defections)
            if probabilities and all([abs(p - 0.5) < 0.25 for p in probabilities]):
                return D
        return C
dataset/ETHPy150Open Axelrod-Python/Axelrod/axelrod/strategies/hunter.py/RandomHunter.strategy/swapped operands of `>`