| xega {xega} | R Documentation |
Package xega
Description
The main program of the e(x)tended (e)volutionary and (g)enetic (a)lgorithm (xega) package.
Layers (in top-down direction)
-
Top-level main programs (Package
xega):RunGA(),ReRun() -
Population level operations - independent of representation (Package
xegaPopulation): The population layer consists of functions for initializing, logging, observing, evaluating a population of genes, as well as of computing the next population. -
Gene level operations - representation-dependent.
-
Binary representation (Package
xegaGaGene): Initialization of random binary genes, several gene maps for binary genes, several mutation operators, several crossover operators with 1 and 2 kids, replication pipelines for 1 and 2 kids, and, last but not least, function factories for configuration. -
Real-coded genes (Package
xegaDfGene). -
Permutation genes (Package
xegaPermGene). -
Derivation-tree genes (Package
xegaGpGene). -
Binary genes with a grammar-driven decoder (Package
xegaGeGene).
-
-
Gene level operations - independent of representation (Package
selectGene): Functions for static and adaptive fitness scaling, gene selection, and gene evaluation as well as for the measurement of performance and for configuration.
Early Termination
A problem environment may implement a function
terminate(solution) which returns TRUE
if the solution meets a condition for early
termination.
Parallel and Distributed Execution
Parallel and distributed execution is supported for
several combinations of hard- and software architectures
by overloading the lapply()-function used in the
evaluation of a fitness function for a population of genes
with a parallel version with the abstract interface:
parallelApply(pop, EvalGene, lF)
where pop is a list of genes, EvalGene the evaluation
function for the fitness of a gene, and lF the local function
configuration of the algorithm.
The several implementations of a parallelApply() function
are provided. The implementations use
the function
parallel::mclapply()for multicore parallelization by the fork mechanism of Unix-based operating systems on a single machine.the function
parallel::parLapply()for socket connections on a single or multiple machines on the Internet.the function
future.apply::future_lapply()for asynchronous parallelization based on future packages.
In addition, user-defined parallel apply functions can be provided.
Example scripts for using the Rmpi::mpi.parLapply() function
of the Rmpi package are provided for a HPC environment with Slurm
as well as on a notebook.
The Architecture of the xegaX-Packages
The xegaX-packages are a family of R-packages which implement e(x)tended (e)volutionary and (g)enetic (a)lgorithms (xega). The architecture has 3 layers, namely the user interface layer, the population layer, and the gene layer:
-
The user interface layer (package
xega<https://CRAN.R-project.org/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<https://CRAN.R-project.org/package=xegaPopulation> ) contains population related functionality as well as support for population statistics dependent adaptive mechanisms and for parallelization. -
The gene layer is split in a representation independent and a representation dependent part:
-
The representation indendent part (package
xegaSelectGene<https://CRAN.R-project.org/package=xegaSelectGene> ) is responsible for variants of selection operators, evaluation strategies for genes, as well as profiling and timing capabilities. -
The representation dependent part consists of the following packages:
-
xegaGaGene<https://CRAN.R-project.org/package=xegaGaGene> for binary coded genetic algorithms. -
xegaPermGene<https://CRAN.R-project.org/package=xegaPermGene> for permutation-based genetic algorithms. -
xegaDfGene<https://CRAN.R-project.org/package=xegaDfGene> for derivation free algorithms as e.g. differential evolution. -
xegaGpGene<https://CRAN.R-project.org/package=xegaGpGene> for grammar-based genetic algorithms. -
xegaGeGene<https://CRAN.R-project.org/package=xegaGaGene> for grammatical evolution algorithms.
The packages
xegaDerivationTreesandxegaBNFsupport the packagesxegaGpGeneandxegaGeGene:-
xegaBNF<https://CRAN.R-project.org/package=xegaBNF> essentially provides a grammar compiler and -
xegaDerivationTrees<https://CRAN.R-project.org/package=xegaDerivationTrees> an abstract data type for derivation trees.
-
-
Copyright
(c) 2023 Andreas Geyer-Schulz
License
MIT
URL
https://github.com/ageyerschulz/xega
Installation
From CRAN by install.packages('xega')
Author(s)
Andreas Geyer-Schulz