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 IIIlIlIl
lIIIlllIIlllIlllll, IllIIIIIlllIIIIl = Action.C, Action.D
class IIIlIlIl(Player):
    IIlIIIlIIllIIlI = "strategy"
    lIIlllllllIlllIIlIl: Dict[Text, Any] = {
        "memory_depth": 1,
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(
        lIIllllIIIIlllIlI,
        llIllIIIIIIIllIIIll: Tuple[Transition, ...] = ((1, lIIIlllIIlllIlllll, 1, lIIIlllIIlllIlllll), (1, IllIIIIIlllIIIIl, 1, IllIIIIIlllIIIIl)),
        lIIIIIIlIIllIIlIIIlI: int = 1,
        lIllllIIlIlIllllllII: Action = lIIIlllIIlllIlllll,
    ) -> None:
        Player.__init__(lIIllllIIIIlllIlI)
        lIIllllIIIIlllIlI.lIIIIIIlIIllIIlIIIlI = lIIIIIIlIIllIIlIIIlI
        lIIllllIIIIlllIlI.lIllllIIlIlIllllllII = lIllllIIlIlIllllllII
        lIIllllIIIIlllIlI.IllIIIIllIllI = SimpleFSM(llIllIIIIIIIllIIIll, lIIIIIIlIIllIIlIIIlI)
    def llllIlIlIllIIlll(lIIllllIIIIlllIlI, lIllllIIII: Player) -> Action:
        if len(lIIllllIIIIlllIlI.history) == 0:
            return lIIllllIIIIlllIlI.lIllllIIlIlIllllllII
        else:
            return lIIllllIIIIlllIlI.IllIIIIllIllI.move(lIllllIIII.history[-1])
class lIlIlllllllllIIIIl(IIIlIlIl):
    IIlIIIlIIllIIlI = "strategy"
    lIIlllllllIlllIIlIl = {
        "memory_depth": 4,
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(lIIllllIIIIlllIlI) -> None:
        llIllIIIIIIIllIIIll = (
            (0, lIIIlllIIlllIlllll, 1, lIIIlllIIlllIlllll),
            (0, IllIIIIIlllIIIIl, 1, lIIIlllIIlllIlllll),  
            (1, lIIIlllIIlllIlllll, 2, lIIIlllIIlllIlllll),
            (1, IllIIIIIlllIIIIl, 2, lIIIlllIIlllIlllll),
            (2, lIIIlllIIlllIlllll, 3, lIIIlllIIlllIlllll),
            (2, IllIIIIIlllIIIIl, 3, lIIIlllIIlllIlllll),
            (3, lIIIlllIIlllIlllll, 4, lIIIlllIIlllIlllll),
            (3, IllIIIIIlllIIIIl, 4, lIIIlllIIlllIlllll),
            (4, lIIIlllIIlllIlllll, 5, IllIIIIIlllIIIIl),
            (4, IllIIIIIlllIIIIl, 5, IllIIIIIlllIIIIl),  
            (5, lIIIlllIIlllIlllll, 6, lIIIlllIIlllIlllll),
            (5, IllIIIIIlllIIIIl, 6, lIIIlllIIlllIlllll),
            (6, lIIIlllIIlllIlllll, 7, lIIIlllIIlllIlllll),
            (6, IllIIIIIlllIIIIl, 7, lIIIlllIIlllIlllll),
            (7, lIIIlllIIlllIlllll, 7, lIIIlllIIlllIlllll),
            (7, IllIIIIIlllIIIIl, 8, IllIIIIIlllIIIIl),
            (8, lIIIlllIIlllIlllll, 9, IllIIIIIlllIIIIl),
            (8, IllIIIIIlllIIIIl, 9, IllIIIIIlllIIIIl),
            (9, lIIIlllIIlllIlllll, 10, lIIIlllIIlllIlllll),
            (9, IllIIIIIlllIIIIl, 10, lIIIlllIIlllIlllll),
            (10, lIIIlllIIlllIlllll, 7, lIIIlllIIlllIlllll),
            (10, IllIIIIIlllIIIIl, 7, lIIIlllIIlllIlllll),
        )
        super().__init__(
            llIllIIIIIIIllIIIll=llIllIIIIIIIllIIIll, lIIIIIIlIIllIIlIIIlI=0, lIllllIIlIlIllllllII=lIIIlllIIlllIlllll
        )