from ..brkga_mp_ipr.types import *
from typing import List

class ExploitationMethod:
    def __init__(self):
        pass

    def initialize(self, initial_populations: List[Population]) -> List[Population]:
        #Initilize the object, if needed, given the initial populations
        #at the end of initialization of BRKGA.
        return initial_populations

    def new_chromosomes(self, new_chromosomes: List[BaseChromosome]) -> List[BaseChromosome]:
        #Called when the next population has been decided but not yet evaluated.
        #Good chance to catch clones (replicates) before they're evaluated again.

        #TODO: Change function name to preprocess_chromosomes
        return new_chromosomes

    def new_population(self, new_population: Population) -> Population:
        #Called at the end of one evolution step.
        #Perform exploitation.
        #TODO: Change function name to perform_exploitation
        return new_population

    def new_mutant(self, new_mutant: BaseChromosome) -> BaseChromosome:
        #Called when a new mutant is generated.
        #Good chance to replace a random mutant with an alternative suggestion.
        # Currently being called, but not implemented anywhere
        #TODO: Change function name to process_mutant
        return new_mutant

