xegaGpInitGeneGe {xegaGpGene} | R Documentation |
Generates a gene as a random derivation tree from a random integer vector.
Description
For a given grammar, xegaGpInitGene()
generates a gene as a random derivation tree
with a depth-bound. This function uses almost the same
initialization algorithm as for grammatical evolution.
Usage
xegaGpInitGeneGe(lF)
Arguments
lF |
Local configuration of the genetic algorithm. |
Details
In the derivation tree representation of
package xegaGpGene
, a gene is a list with
-
$gene1
: a derivation tree. -
$fit
: The fitness of the genotype of$gene1
-
$evaluated
: Boolean: TRUE if the fitness is known. -
$evalFail
: Has the evaluation of the gene failed? -
$var
: The cumulative variance of the fitness of all evaluations of a gene. (For stochastic functions) -
$sigma
: The standard deviation of the fitness of all evaluations of a gene. (For stochastic functions) -
$obs
: The number of evaluations of a gene. (For stochastic functions)
The algorithm for generating a complete derivation tree
with a depth-bound
is imported from the package xegaDerivationTrees
.
Value
Derivation tree.
See Also
Other Gene Generation:
xegaGpInitGene()
Examples
gene<-xegaGpInitGeneGe(lFxegaGpGene)
xegaGpDecodeGene(gene, lFxegaGpGene)