diff --git a/README.md b/README.md index 4003d9a..29eef6a 100644 --- a/README.md +++ b/README.md @@ -6,29 +6,29 @@ [![Build status](https://ci.appveyor.com/api/projects/status/eu0nns2dsgocwntw/branch/master?svg=true)](https://ci.appveyor.com/project/jakobbossek/ecr/branch/master) [![Coverage Status](https://coveralls.io/repos/jakobbossek/ecr/badge.svg)](https://coveralls.io/r/jakobbossek/ecr) -The **ecr** package provides a powerful framework for **Evolutionary Computation** in R. It has build-in support for several standard genotypes like floating-point numbers, binary strings and permutations. Beside different pre-defined building blocks in form of evolutionary operators (selectors, mutators, recombinators), e.g., k-Tournament-Selection, Gauss-Mutation, Crossover, ecr offers the possibility to extend the available toolbox by defining new operators. Moreover, if the predefined genomes are not sufficient for the problem at hand, a custom mode is available to customize even the genotype. +The **ecr** package provides a powerful framework for both single- and multi-objective **evolutionary algorithms** in R. It has build-in support for several standard genotypes like real-valued vectors, binary strings and permutations. Beside, different pre-defined **building blocks** in form of evolutionary operators (selectors, mutators, recombinators), e.g., k-Tournament-Selection, Gauss-Mutation, Crossover and many helper functions frequently needed in evolutionary algorithms are provided. The possibility to extend the available toolbox by defining new operators and even operate on non-standard representation makes the package very flexible. -## Overview of features +## Overview of Features -* Optimization of single-objective functions -* Build-in genotypes *float*, *binary*, and *permutation* -* Big collection of evolutionary operators +* Optimization of single and multi-objective functions +* Build-in genotypes *float*, *binary*, and *permutation* and *custom*. The latter enables custom representations/genotypes +* Large collection of evolutionary operators * Storing of the optimization process in an optimization path * Methods to visualize results -## Installation instructions +## Installation Instructions -The package will be available in a first version at [CRAN](http://cran.r-project.org) soon. If you are interested in trying out and playing around with the current github developer version use the [devtools](https://github.com/hadley/devtools) package and type the following command in R. +The package will be available in a first version at [CRAN](http://cran.r-project.org) soon. If you are interested in trying out and playing around with the current github developer version use the [devtools](https://github.com/hadley/devtools) package and type the following command in R: ```splus devtools::install_github("jakobbossek/ecr") ``` -## Short example +## Quickstart Example -In this section we want to optimize a one dimensional function with an Evolutionary Algorithm using just the evolutionary operators shipped with the package. A more in-depth introduction will be made available soon. +In this section we want to optimize a one dimensional function with an evolutionary algorithm using just the evolutionary operators shipped with the package. A more in-depth introduction will be available soon. -The [smoof](https://github.com/jakobbossek/smoof) R package provides a collection of different single objective test functions commonly used in algorithm benchmarking. As an example we are going to search for the global optimum of the one-dimensional Rastrigin function. +The [smoof](https://github.com/jakobbossek/smoof) R package provides a collection of different single objective test functions commonly used in algorithm benchmarking. As an example we are going to search for the global optimum of the one-dimensional *Rastrigin* function. ```splus library(smoof) @@ -41,9 +41,10 @@ autoplot(obj.fun) As a next step we generate an ecr *control object*, which holds all the neccessary parameters for the evolutionary algorithm. The construction of this object needs consists of generating the object itself and kind of decorating it with some evolutionary operators. -For our setup we choose the *atural* representation with real-valued numbers as the genotype, a population size of 20 individuals with 5 individuals being created by recombination and mutation in each generation. Furthermore we decide to use a 'plus' survival strategy, i. e., the current population and the offspring will be merged before survival selection takes place. Gauss mutation with a standard deviance of 0.005 serves as the mutation operator and we keep the intermediate recombination operator (which is the default for representation float). Moreover we define a maximal number of 50 generations. +For our setup we choose the *natural* representation with real-valued numbers as the genotype, a population size of 20 individuals with 5 individuals being created by recombination and mutation in each generation. Furthermore we decide to use a 'plus' survival strategy, i. e., the current population and the offspring will be merged before survival selection takes place. Gauss mutation with a standard deviance of 0.005 serves as the mutation operator and we keep the intermediate recombination operator (which is the default for representation float). Moreover we define a maximal number of 50 generations. ```splus +# Generate the control object (set basic parameters) control = setupECRControl( n.population = 20L, n.offspring = 10L, @@ -54,6 +55,8 @@ control = setupECRControl( makeMaximumIterationsStoppingCondition(max.iter = 50L) ) ) + +# Setup the evolutionary toolbox by specifying operators control = setupEvolutionaryOperators( control, mutator = makeGaussMutator(sdev = 0.005) @@ -71,7 +74,7 @@ print(as.data.frame(res$opt.path)) print(autoplot(res, complete.trace = TRUE, log.fitness = TRUE)) ``` -Take a glance at the examples in the inst/examples directory. +Further, more complicated examples are located in the *inst/examples* directory. ## Contact