geneticengine.problems
Submodules
Attributes
Exceptions
Common base class for all non-exit exceptions. |
Classes
Represents the Optimization Problem being solved. |
|
SequentialObjectiveProblem is defined by a list of objectives that are intended to be either maximized/minimized in order. |
|
A problem that is characterized by a single value. |
|
Represents the Optimization Problem being solved. |
|
LazyMultiObjectiveProblem is used for problems whose number of objectives is not known a-priori. |
Package Contents
- exception geneticengine.problems.InvalidFitnessException
Bases:
ExceptionCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- class geneticengine.problems.Fitness
Bases:
NamedTuple- fitness_components: list[float]
- valid: bool = True
- __str__()
- geneticengine.problems.P
- class geneticengine.problems.Problem(fitness_function, minimize, target=None)
Bases:
abc.ABC,Generic[P]Represents the Optimization Problem being solved.
- Parameters:
fitness_function (Callable[[P], list[float]])
minimize (list[bool])
target (Optional[list[float]])
- minimize: list[bool]
- target: list[float] | None
- ff
- abstractmethod is_better(a, b)
Returns whether the first fitness is better than the second.
- number_of_objectives()
- Return type:
int
- class geneticengine.problems.SequentialObjectiveProblem(fitness_function, minimize, target=None)
-
SequentialObjectiveProblem is defined by a list of objectives that are intended to be either maximized/minimized in order.
- Parameters:
fitness_function (Callable[[P], list[float]])
minimize (list[bool])
target (Optional[list[float]])
- class geneticengine.problems.SingleObjectiveProblem(fitness_function, minimize=False, target=None)
Bases:
SequentialObjectiveProblem[P]A problem that is characterized by a single value.
- Parameters:
fitness_function (Callable[[P], float])
minimize (bool)
target (Optional[float])
- class geneticengine.problems.MultiObjectiveProblem(fitness_function, minimize, target=None)
-
Represents the Optimization Problem being solved.
- Parameters:
fitness_function (Callable[[P], list[float]])
minimize (list[bool])
target (Optional[list[float]])
- class geneticengine.problems.LazyMultiObjectiveProblem(fitness_function, minimize=False, target=None)
Bases:
MultiObjectiveProblemLazyMultiObjectiveProblem is used for problems whose number of objectives is not known a-priori.
- Parameters:
fitness_function (Callable[[P], list[float]])
minimize (bool)
target (Optional[float])
- initialized = False
- future_minimize = False
- future_target = None
- number_of_objectives()
- Return type:
int
- geneticengine.problems.__ALL__