Struct programinduction::pcfg::GeneticParams[][src]

pub struct GeneticParams {
    pub progeny_factor: f64,
    pub mutation_point: f64,
    pub mutation_subtree: f64,
    pub mutation_reproduction: f64,
}

Parameters for PCFG genetic programming (GP).

Values for each mutation_ field should be probabilities that sum to 1. Every mutation will randomly select one of these variants.

Fields

The progeny factor determines the distribution over nodes in a statement when a node/subtree is randomly selected. If set to 1, each node has uniform probability of being chosen for mutation. If set to 2, then every parent is half as likely to be chosen than any one of its children.

A point mutation replaces a single node with a valid rule that may take its place, without changing any children.

A subtree mutation replaces a subtree with a valid sentence that may take its place.

A reproduction mutation is a no-op.

Trait Implementations

impl Default for GeneticParams
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations