def setUp(self): self.problem = EmptyProblem() self.sequential = Sequential([ PopulationOnePointCrossover(c_rate=1), TournamentSelection(k=10, tournament_size=3, problem=self.problem) ]) self.initializer = PopulationRandomInitializer(k=10, t_prob=0.5, max_depth=3, problem=self.problem) self.terminal_condition = TerminalCondition([GenerationTerminator(10)])
def setUp(self): ExampleSolution.__init__(self) self.problem = EmptyProblem() self.pop = [solution.Solution(node.Node()) for _ in range(100)]
def setUp(self): ExampleSolution.__init__(self) self.problem = EmptyProblem() self.mutation = mu.PointMutation(1.0, problem=self.problem, mutation_type='onepoint')
def setUp(self): self.root_id = 0 ExampleSolution.__init__(self, root_id=self.root_id) self.problem = EmptyProblem()
def setUp(self): ExampleSolutions.__init__(self) self.tournament_size = 2 self.k = 3 self.problem = EmptyProblem()
def setUp(self): ExampleSolutions.__init__(self) self.k = 3 self.problem = EmptyProblem()