xegaGpInitGene {xegaGpGene}R Documentation

Generates a gene as a random derivation tree.

Description

For a given grammar, xegaGpInitGene() generates a gene as a random derivation tree with a depth-bound.

Usage

xegaGpInitGene(lF)

Arguments

lF

Local configuration of the genetic algorithm.

Details

In the derivation tree representation of package xegaGp, gene is a list with

  1. $evaluated: Boolean: TRUE if the fitness is known.

  2. $fit: The fitness of the genotype of $gene1

  3. $gene1: a derivation tree.

This representation makes implementation of several code optimizations and generalizations easier.

The algorithm for generating a complete derivation tree with a depth-bound is imported from package xegaDerivationTrees.

Value

Derivation tree.

Examples

gene<-xegaGpInitGene(lFxegaGpGene)


[Package xegaGpGene version 1.0.0.0 Index]