from axelrod.action import Action
from axelrod.player import Player
llIIllIIlIlIlIlII, IIIllllIlIlllII = Action.C, Action.D
class IIIllIIIlIlIllIlIIll(Player):
    IlIIllllIlllIIlllII = "strategy"
    IIIlIlIIIlIlIIIl = {
        "memory_depth": float("inf"),
        "stochastic": True,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def lIllllIllIllllIlI(lllIlIIllIIIIlIlI, IlIlllIIIIIIIII: Player) -> Action:
        IlIlIllIIlIIlllIl = len(lllIlIIllIIIIlIlI.history) + 1
        if IlIlIllIIlIIlllIl == 1:
            return llIIllIIlIlIlIlII
        else:
            IIIIlIlIIlIIIllIll = 1 - IlIlllIIIIIIIII.defections / (IlIlIllIIlIIlllIl - 1)
            return lllIlIIllIIIIlIlI._random.random_choice(IIIIlIlIIlIIIllIll)