Reproduction¶
- evolib.operators.reproduction.generate_cloned_offspring(parents, lambda_, *, current_gen=0)[source]¶
Creates
lambda_cloned offspring by randomly selecting parents with replacement.Each offspring is a deep copy of a randomly chosen parent. This method performs no crossover or mutation and is typically used in evolutionary strategies such as (mu,
lambda), (mu +lambda), or steady-state evolution to initialize raw offspring before variation operators are applied.- Lineage tracking:
Sets parent_id to parent’s ID
Sets birth_gen to current_gen
Resets structural and HELI flags
- Parameters:
parents (
List[Any]) – List of parent individuals to clone from.lambda_ (int) – Number of offspring to create.
current_gen (
int) – current generation index (for birth_gen annotation).
- Returns:
List of cloned offspring individuals.
- Return type:
List[Any]- Raises:
ValueError – If the parent list is empty or
lambda_is not positive.