geneticengine.solutions.individual
Attributes
Exceptions
Common base class for all non-exit exceptions. |
Classes
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
Module Contents
- geneticengine.solutions.individual.G
- geneticengine.solutions.individual.P
- exception geneticengine.solutions.individual.IndividualNotEvaluatedException
Bases:
ExceptionCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- class geneticengine.solutions.individual.Individual(metadata=None)
Bases:
Generic[P],abc.ABCHelper class that provides a standard way to create an ABC using inheritance.
- Parameters:
metadata (dict[str, Any] | None)
- fitness_store: weakref.WeakKeyDictionary[geneticengine.problems.Problem, geneticengine.problems.Fitness]
- metadata: dict[str, Any]
- abstractmethod get_phenotype()
- Return type:
P
- has_fitness(problem)
- Parameters:
problem (geneticengine.problems.Problem)
- Return type:
bool
- set_fitness(problem, fitness)
- Parameters:
problem (geneticengine.problems.Problem)
fitness (geneticengine.problems.Fitness)
- get_fitness(problem=None)
- Parameters:
problem (geneticengine.problems.Problem | None)
- Return type:
- class geneticengine.solutions.individual.ConcreteIndividual(instance, metadata=None)
Bases:
Generic[P],Individual[P]Helper class that provides a standard way to create an ABC using inheritance.
- Parameters:
instance (P)
metadata (dict[str, Any] | None)
- instance: P
- get_phenotype()
- class geneticengine.solutions.individual.PhenotypicIndividual(genotype, representation, metadata=None)
Bases:
Generic[G,P],Individual[P]Helper class that provides a standard way to create an ABC using inheritance.
- Parameters:
genotype (G)
representation (geneticengine.representations.api.Representation[G, P])
metadata (dict[str, Any] | None)
- genotype: G
- representation: geneticengine.representations.api.Representation[G, P]
- phenotype: P | None = None
- get_phenotype()
- __str__()
- Return type:
str