alogos.systems.ge.neighborhood
¶
Neighborhood functions to generate nearby genotypes for GE.
Functions¶
|
Systematically change a chosen number of int codons. |
Detailed object descriptions¶
- alogos.systems.ge.neighborhood.int_replacement(grammar, genotype, parameters=None)[source]¶
Systematically change a chosen number of int codons.
- Parameters:
grammar (
Grammar
)genotype (
Genotype
)parameters (
dict
orParameterCollection
, optional) – Following keyword-value pairs are considered by this function:neighborhood_distance
(int
) : The distance from the original genotype to a new genotype in terms of replaced int codons.neighborhood_max_size
(int
) : Maximum number of neighbor genotypes to generate.neighborhood_only_terminals
(bool
) : IfTrue
, only replace codons that represent terminals.max_expansions
(bool
) : Maximum number of nonterminal expansions used in a derivation.max_wraps
(bool
) : Maximum number of wraps of the genotype that can be used in a derivation.
- Returns: