Class: Mapper::DepthLocusEmbConsts

Generator show all
ConstantsInGenotype, ExtendAll, LocusGenetic
Defined in:


Mapper class employing the depth-locus node expansion strategy with an embedded constants support.

Embedded constants simplify derivation trees during genotype-phenotype mapping phase. They may help to reduce a search space. Constants’ values are stored directly inside a genotype in one or more codons. Encoding parameters are specified in the configuration of DepthLocusEmbConsts mapper under the “embedded_constants” section. Constants identifiers have to exactly match literals (placeholders) used in the grammar. Ranges of constants have to be specified in the configuration, a number of codons used for encoding is optional (default is 1). The type of the constant (Float or Integer) is inferred from types of range limits.

Example configuration:

    class: DepthLocusEmbConsts
        min: -2.0
        max: 2.0
        codons: 2
        min: 0
        max: 80000

For instance, given the configuration above, each occurence of the terminal symbol “C2” is replaced by the random integer constant during the phenotype initialization.

For details see:

The expansion strategy is described in Mapper::DepthLocus.

Instance Attribute Summary

Attributes included from ConstantsInGenotype


Attributes inherited from Generator

#generated_count, #random

Attributes inherited from Base

#codon, #complexity, #consume_trivial_codons, #grammar, #mapped_count, #track_support, #track_support_on, #used_length, #wraps_to_fading, #wraps_to_fail

Method Summary

Methods included from ConstantsInGenotype

#embedded_constants=, #modify_expansion_base, #modify_expansion_generate

Methods inherited from Generator

#generate, #generate_full, #generate_grow, #initialize

Methods inherited from Base

#initialize, #phenotype

Constructor Details

This class inherits a constructor from Mapper::Generator