Skip to content

Commit

Permalink
add population parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
saccuz committed Nov 21, 2023
1 parent 3c2ea88 commit af4ff48
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions byron/ea/parametric.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def parametric_ea(top_frame: type[FrameABC],
operators: list[Callable] = None,
end_conditions: list[Callable] = None,
alpha: int = 10,
rewards: list[float] = [0.3, 0.7]
rewards: list[float] = [0.3, 0.7],
population_extra_parameters: dict = None,
) -> Population:

r"""A configurable evolutionary algorithm
Expand Down Expand Up @@ -133,7 +134,7 @@ def extimate_operator_probability(operators_list: list[Callable], iterations: in
stopping_conditions.append(lambda: best.fitness == max_fitness or best.fitness >> max_fitness)

# initialize population
population = Population(top_frame)
population = Population(top_frame, extra_parameters=population_extra_parameters, memory=False)
ops0 = take_operators(True, operators)

gen0 = list()
Expand Down

0 comments on commit af4ff48

Please sign in to comment.