evol.problems.functions package

Submodules

evol.problems.functions.variableinput module

class evol.problems.functions.variableinput.FunctionProblem(size=2)[source]

Bases: evol.problems.problem.Problem

check_solution(solution: Sequence[float]) → Sequence[float][source]
eval_function(solution: Sequence[float]) → float[source]
value(solution)[source]
class evol.problems.functions.variableinput.Rastrigin(size=2)[source]

Bases: evol.problems.functions.variableinput.FunctionProblem

value(solution: Sequence[float]) → float[source]

The optimal value can be found when a sequence of zeros is given. :param solution: a sequence of x_i values :return: the value of the Rosenbrock function

class evol.problems.functions.variableinput.Rosenbrock(size=2)[source]

Bases: evol.problems.functions.variableinput.FunctionProblem

value(solution: Sequence[float]) → float[source]

The optimal value can be found when a sequence of ones is given. :param solution: a sequence of x_i values :return: the value of the Rosenbrock function

class evol.problems.functions.variableinput.Sphere(size=2)[source]

Bases: evol.problems.functions.variableinput.FunctionProblem

value(solution: Sequence[float]) → float[source]

The optimal value can be found when a sequence of zeros is given. :param solution: a sequence of x_i values :return: the value of the Sphere function

Module contents

The evol.problems.functions part of the library contains simple problem instances that do with known math functions.

The functions in here are typically inspired from wikipedia: https://en.wikipedia.org/wiki/Test_functions_for_optimization