xegaGeGene: Package xegaGeGene.

xegaGeGeneR Documentation

Package xegaGeGene.

Description

The xegaGeGene package provides functions implementing grammatical evolution with binary-coded genes:

Details

  • Gene initialization.

  • Gene maps for the mod and (approximately) for the bucket rule.

  • Grammar-based decoders for binary coded genes.

  • Analysis of the interaction of codon precision with the rule choice bias for a given grammar.

  • Automatic determination of codon precision with a limited rule choice bias.

Gene Initialization

The number of bits of a gene are specified by lF$BitsOnGene().

The number of bits of a codon are specified by lF$CodonPrecision().

Binary Gene Representation

A binary gene is a named list:

  • $gene1: The gene must be a binary vector.

  • $fit: The fitness value of the gene (for EvalGeneDet and EvalGeneU) or the mean fitness (for stochastic functions evaluated with EvalGeneStoch).

  • $evaluated: Has the gene been evaluated?

  • $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)

Abstract Interface of Problem Environment

A problem environment penv must provide:

  • $f(parameters, gene, lF): Function with a real parameter vector as the first argument which returns a gene with evaluated fitness.

  • $genelength(): The number of bits of the binary-coded integer parameter vector. Used in InitGene.

  • $bitlength(): A vector specifying the number of bits used for coding each integer parameter. If penv$bitlength()[1] is 20, then parameters[1] is coded by 20 bits. Used in GeneMap.

  • $lb(): The lower bound vector of each parameter. Used in GeneMap.

  • $ub(): The upper bound vector of each parameter. Used in GeneMap.

The Architecture of the xegaX-Packages

The xegaX-packages are a family of R-packages which implement eXtended Evolutionary and Genetic Algorithms (xega). The architecture has 3 layers, namely the user interface layer, the population layer, and the gene layer:

  • The user interface layer (package xega) provides a function call interface and configuration support for several algorithms: genetic algorithms (sga), permutation-based genetic algorithms (sgPerm), derivation-free algorithms as e.g. differential evolution (sgde), grammar-based genetic programming (sgp) and grammatical evolution (sge).

  • The population layer (package xegaPopulation) contains population-related functionality as well as support for population statistics dependent adaptive mechanisms and parallelization.

  • The gene layer is split in a representation-independent and a representation-dependent part:

    1. The representation-indendent part (package xegaSelectGene) is responsible for variants of selection operators, evaluation strategies for genes, as well as profiling and timing capabilities.

    2. The representation-dependent part consists of the following packages:

      • xegaGaGene for binary coded genetic algorithms.

      • xegaPermGene for permutation-based genetic algorithms.

      • xegaDfGene for derivation-free algorithms as e.g. differential evolution.

      • xegaGpGene for grammar-based genetic algorithms.

      • xegaGeGene for grammatical evolution algorithms.

      The packages xegaDerivationTrees and xegaBNF support the last two packages: xegaBNF essentially provides a grammar compiler and xegaDerivationTrees is an abstract data type for derivation trees.

Copyright

(c) 2024 Andreas Geyer-Schulz

License

MIT

URL

https://github.com/ageyerschulz/xegaGeGene

Installation

From CRAN by install.packages('xegaGeGene')

Author(s)

Andreas Geyer-Schulz

References

Ryan, Conor and Collins, J. J. AND Neill, Michael O. (1998) Grammatical evolution: Evolving programs for an arbitrary language. In: Banzhaf, Wolfgang and Poli, Riccardo, Schoenauer, Marc and Fogarty, Terence C. (1998): Genetic Programming. First European Workshop, EuroGP' 98 Paris, France, April 14-15, 1998 Proceedings, Lecture Notes in Computer Science, 1391, Springer, Heidelberg. <doi:10.1007/BFb0055930>

O'Neil, Michael AND Ryan, Conor (2003) Grammatical Evolution: Evolutionary Automatic Programming in an Arbitrary Language. Kluwer, Dordrecht. <ISBN:1-4020-7444-1>

Ryan, Conor and O'Neill, Michael and Collins, J. J. (2018) Handbook of Grammatical Evolution. Springer International Publishing, Cham. <doi:10.1007/978-3-319-78717-6>

See Also

Useful links:


xegaGeGene documentation built on June 8, 2025, 1:09 p.m.