# Path: modules/game/AnalysedMove.py
# UCI = NewType('UCI', str)
# class AnalysedMove(NamedTuple('AnalysedMove', [
#         ('uci', UCI),
#         ('move', MoveNumber),
#         ('emt', Emt),
#         ('engineEval', EngineEval),
#         ('analyses', List[Analysis])
#     ])):
# class AnalysisBSONHandler:
# class AnalysedMoveBSONHandler:
#     def tensor(self, timeAvg: Number, wclAvg: Number) -> List[Number]:
#     def nullTensor() -> List[int]:
#     def top(self) -> Opt[Analysis]:
#     def difToNextBest(self) -> Number:
#     def difToNextWorst(self) -> Number:
#     def PVsWinningChancesLoss(self) -> Number:
#     def averageWinningChancesLoss(self) -> Number:
#     def winningChancesLoss(self, usePV: bool = False) -> Number:
#     def advantage(self) -> Number:
#     def ambiguity(self) -> int: # 1 = only one top move, 5 = all moves good
#     def trueRank(self) -> TrueRank:
#     def rank(self) -> Rank:
#     def projectedRank(self) -> Number:
# def winningChances(engineEval: EngineEval) -> Number:
# def similarChances(c1: Number, c2: Number) -> bool:
#     def reads(bson: Dict) -> Analysis:
#     def writes(analysis: Analysis) -> Dict:
#     def reads(bson: Dict) -> AnalysedMove:
#     def writes(analysedMove: AnalysedMove) -> Dict:
# 
# Path: modules/irwin/AnalysedGameModel.py
# class AnalysedGamePrediction(NamedTuple('AnalysedGamePrediction', [
#         ('game', GamePrediction),
#         ('lstmMoves', List[MovePrediction]),
#         ('isolatedMoves', List[MovePrediction])
#     ])):
# class AnalysedGameModel:
#     def fromTensor(tensor: ndarray, length: int):
#     def weightedMovePredictions(self) -> List[WeightedMovePrediction]:
#     def weightedGamePrediction(self) -> WeightedGamePrediction:
#     def __init__(self, config: ConfigWrapper, newmodel: bool = False):
#     def createModel(self, newmodel: bool = False) -> Model:
#     def predict(self, gameAnalysedGames: List[GameAnalysedGame]) -> List[Opt[ndarray]]:
#     def saveModel(self):


from default_imports import *
from modules.game.AnalysedMove import AnalysedMove, TrueRank
from modules.irwin.AnalysedGameModel import WeightedMovePrediction


class MoveReport(NamedTuple('MoveReport', [
        ('activation', WeightedMovePrediction),
        ('rank', TrueRank),
        ('ambiguity', int),
        ('advantage', int),
        ('loss', int)
    ])):
    @staticmethod

# Path: modules/game/AnalysedMove.py
# UCI = NewType('UCI', str)
# class AnalysedMove(NamedTuple('AnalysedMove', [
#         ('uci', UCI),
#         ('move', MoveNumber),
#         ('emt', Emt),
#         ('engineEval', EngineEval),
#         ('analyses', List[Analysis])
#     ])):
# class AnalysisBSONHandler:
# class AnalysedMoveBSONHandler:
#     def tensor(self, timeAvg: Number, wclAvg: Number) -> List[Number]:
#     def nullTensor() -> List[int]:
#     def top(self) -> Opt[Analysis]:
#     def difToNextBest(self) -> Number:
#     def difToNextWorst(self) -> Number:
#     def PVsWinningChancesLoss(self) -> Number:
#     def averageWinningChancesLoss(self) -> Number:
#     def winningChancesLoss(self, usePV: bool = False) -> Number:
#     def advantage(self) -> Number:
#     def ambiguity(self) -> int: # 1 = only one top move, 5 = all moves good
#     def trueRank(self) -> TrueRank:
#     def rank(self) -> Rank:
#     def projectedRank(self) -> Number:
# def winningChances(engineEval: EngineEval) -> Number:
# def similarChances(c1: Number, c2: Number) -> bool:
#     def reads(bson: Dict) -> Analysis:
#     def writes(analysis: Analysis) -> Dict:
#     def reads(bson: Dict) -> AnalysedMove:
#     def writes(analysedMove: AnalysedMove) -> Dict:
# 
# Path: modules/irwin/AnalysedGameModel.py
# class AnalysedGamePrediction(NamedTuple('AnalysedGamePrediction', [
#         ('game', GamePrediction),
#         ('lstmMoves', List[MovePrediction]),
#         ('isolatedMoves', List[MovePrediction])
#     ])):
# class AnalysedGameModel:
#     def fromTensor(tensor: ndarray, length: int):
#     def weightedMovePredictions(self) -> List[WeightedMovePrediction]:
#     def weightedGamePrediction(self) -> WeightedGamePrediction:
#     def __init__(self, config: ConfigWrapper, newmodel: bool = False):
#     def createModel(self, newmodel: bool = False) -> Model:
#     def predict(self, gameAnalysedGames: List[GameAnalysedGame]) -> List[Opt[ndarray]]:
#     def saveModel(self):


# Path: modules/irwin/MoveReport.py
from default_imports import *
from modules.game.AnalysedMove import AnalysedMove, TrueRank
from modules.irwin.AnalysedGameModel import WeightedMovePrediction



class MoveReport(NamedTuple('MoveReport', [
        ('activation', WeightedMovePrediction),
        ('rank', TrueRank),
        ('ambiguity', int),
        ('advantage', int),
        ('loss', int)
    ])):
    @staticmethod

    def new(analysedMove: AnalysedMove, movePrediction: WeightedMovePrediction):