from typing import Dict, List, Optional, Tuple
from scipy.stats import chisquare
from axelrod.action import Action
from axelrod.player import Player
from axelrod.strategy_transformers import FinalTransformer
from .memoryone import MemoryOnePlayer
IllIlIllIIIIllIII, IllllllIlIIIlIlllI = Action.C, Action.D
class IIIlIIIllII(Player):
    IIIlIllIII = "strategy"
    lIllIIlI = {
        "memory_depth": float("inf"),
        "stochastic": True,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(IIIlllIIIlllllIIIll) -> None:
        super().__init__()
        IIIlllIIIlllllIIIll.lllIlIlI = 11
    def lllIlIIlllIIllIl(IIIlllIIIlllllIIIll, lllllIIllllIIIl: Player) -> Action:
        if len(IIIlllIIIlllllIIIll.history) < IIIlllIIIlllllIIIll.lllIlIlI:
            return IllIlIllIIIIllIII
        IlIlIIllIlIIlll = IIIlllIIIlllllIIIll.lllIlIlI - 1
        llIllIllIlllII = lllllIIllllIIIl.history[-IlIlIIllIlIIlll:].count(IllIlIllIIIIllIII)
        IIIIIlIIllIlIIIlI = llIllIllIlllII / IlIlIIllIlIIlll
        llIlllllllIll = max(0, IIIIIlIIllIlIIIlI - 0.10)
        return IIIlllIIIlllllIIIll._random.random_choice(llIlllllllIll)