src/orion/algo/evolution_es.py
def _get_teams(self, rung_id):
        """Get the red team and blue team"""
        if self.has_rung_filled(rung_id + 1):
            return []

        rung = self.rungs[rung_id]["results"]

        population_range = (
            self.eves.nums_population
            if len(list(rung.values())) > self.eves.nums_population
            else len(list(rung.values()))
        )

        for i in range(population_range):
            for j in self.search_space_remove_fidelity:
                self.eves.population[j][i] = list(rung.values())[i][1][j]
            self.eves.performance[i] = list(rung.values())[i][0]

        population_index = list(range(self.eves.nums_population))
        red_team = self.eves.rng.choice(
            population_index, self.eves.nums_comp_pairs, replace=False
        )
        diff_list = list(set(population_index).difference(set(red_team)))
        blue_team = self.eves.rng.choice(
            diff_list, self.eves.nums_comp_pairs, replace=False
        )

        return rung, population_range, red_team, blue_team
Get the red team and blue team
Get the red team and blue team
Get the red team and blue team
def _get_teams(self, rung_id):
        if self.has_rung_filled(rung_id + 1):
            return []
        rung = self.rungs[rung_id]["results"]
        population_range = (
            self.eves.nums_population
            if len(list(rung.values())) > self.eves.nums_population
            else len(list(rung.values()))
        )
        for i in range(population_range):
            for j in self.search_space_remove_fidelity:
                self.eves.population[j][i] = list(rung.values())[i][1][j]
            self.eves.performance[i] = list(rung.values())[i][0]
        population_index = list(range(self.eves.nums_population))
        red_team = self.eves.rng.choice(
            population_index, self.eves.nums_comp_pairs, replace=False
        )
        diff_list = list(set(population_index).difference(set(red_team)))
        blue_team = self.eves.rng.choice(
            diff_list, self.eves.nums_comp_pairs, replace=False
        )
        return rung, population_range, red_team, blue_team
def _get_teams ( self , rung_id ) : if self . has_rung_filled ( rung_id + 1 ) : return [ ] rung = self . rungs [ rung_id ] [ "results" ] population_range = ( self . eves . nums_population if len ( list ( rung . values ( ) ) ) > self . eves . nums_population else len ( list ( rung . values ( ) ) ) ) for i in range ( population_range ) : for j in self . search_space_remove_fidelity : self . eves . population [ j ] [ i ] = list ( rung . values ( ) ) [ i ] [ 1 ] [ j ] self . eves . performance [ i ] = list ( rung . values ( ) ) [ i ] [ 0 ] population_index = list ( range ( self . eves . nums_population ) ) red_team = self . eves . rng . choice ( population_index , self . eves . nums_comp_pairs , replace = False ) diff_list = list ( set ( population_index ) . difference ( set ( red_team ) ) ) blue_team = self . eves . rng . choice ( diff_list , self . eves . nums_comp_pairs , replace = False ) return rung , population_range , red_team , blue_team
Get the red team and blue team
Get the red team and blue team
"""Get the red team and blue team"""
self
rung_id