from typing import List
import numpy as np
from axelrod.action import Action
from axelrod.interaction_utils import compute_final_score
from axelrod.player import Player
from axelrod.strategies.finite_state_machines import FSMPlayer
IIlIllIllIlIlIIlI, llIIIlIIlIlIIlllI = Action.C, Action.D
class IIIlIIIIllIlIlIlI(Player):
    lIIIlIIllIIIl = "strategy"
    IIIlIIIIIlIIlIIll = {
        "memory_depth": float("inf"),
        "stochastic": True,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(lIllIIlIIIll) -> None:
        super().__init__()
        lIllIIlIIIll.IIIlIlIllllIlllII = 0.0  
    def IlllIIlIlIIIlIlIllIl(lIllIIlIIIll, IIllllllIIlIIlllllII: Player) -> Action:
        if not IIllllllIIlIIlllllII.history:
            return IIlIllIllIlIlIIlI
        lIllIIlIIIll.IIIlIlIllllIlllII += 1 if IIllllllIIlIIlllllII.history[-1] == llIIIlIIlIlIIlllI else 0
        lIllIIlIIIll.IIIlIlIllllIlllII *= 0.5  
        return lIllIIlIIIll._random.random_choice(1.0 - lIllIIlIIIll.IIIlIlIllllIlllII)