from math import pi, sin
from axelrod.action import Action
from axelrod.player import Player
llIIllllIlIIlI, IIIllIllIlIlIIlll = Action.C, Action.D
class IlIlIlIllIIllIIlIl(Player):
    IlIIlIIIIlllIIlIIlI = "strategy"
    IIlIlIlllIIIl = {
        "memory_depth": float("inf"),
        "stochastic": True,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def lllIIIlII(llIIIIlIlIIIIlIlllI, IIlIIlIlIlIlIlll: Player) -> Action:
        IIIIlIIlIlllIllIll = len(llIIIIlIlIIIIlIlllI.history)
        lIIllllIIIlIl = sin(2 * pi * IIIIlIIlIlllIllIll / 10)
        if lIIllllIIIlIl > 0.95:
            return IIIllIllIlIlIIlll
        if 0.95 > abs(lIIllllIIIlIl) > 0.3:
            return IIlIIlIlIlIlIlll.history[-1]
        if 0.3 > lIIllllIIIlIl > -0.3:
            return llIIIIlIlIIIIlIlllI._random.random_choice()
        return llIIllllIlIIlI