Skip to content

Commit

Permalink
remove soobench package
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobbossek committed Feb 28, 2015
1 parent 99c0b94 commit 03af39e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ install:
- ./travis-tool.sh github_package berndbischl/ParamHelpers
- ./travis-tool.sh github_package jakobbossek/smoof
- ./travis-tool.sh github_package jimhester/covr
- ./travis-tool.sh r_install soobench
- ./travis-tool.sh install_deps
script: ./travis-tool.sh run_tests

Expand Down
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ Imports:
parallelMap (>= 1.1),
reshape2 (>= 1.4.1)
Suggests:
testthat,
soobench
testthat
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ devtools::install_github("jakobbossek/ecr")

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.

The [soobench](http://cran.r-project.org/web/packages/soobench/index.html) 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 function definition is located in the soobench package, but *ecr* needs the objective function to be of [smoof](https://github.com/jakobbossek/smoof) type. Fortunately there is a function which generates an smoof function out of a soobench 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(soobench)
library(smoof)
library(ecr)

obj.fun = makeSingleObjectiveFunctionFromSOOFunction("rastrigin", dimensions = 1L)

obj.fun = makeRastriginFunction(dimensions = 1L)
```

As a next step we generate an ecr *control object*, which holds all the neccessary parameters for the evolutionary algorithm. We decide ourself for 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.
Expand Down
11 changes: 4 additions & 7 deletions inst/examples/smoof_example.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
library(methods)
library(testthat)
library(devtools)
library(soobench)
library(smoof)
library(ggplot2)
library(BBmisc)

Expand Down Expand Up @@ -38,11 +38,8 @@ myMonitorStep = function(envir = parent.frame()) {

myMonitor = makeMonitor(step = myMonitorStep)

# the soobench generator names changes in the recent dev version
if (!exists("rastrigin_function", mode = "function")) {
rastrigin_function = generate_rastrigin_function
}
obj.fun = makeSingleObjectiveFunctionFromSOOFunction("rastrigin", dimensions = 1L)
# generate objective function
obj.fun = makeRastriginFunction(dimensions = 1L)

# initialize control object
control = ecr.control(
Expand All @@ -53,7 +50,7 @@ control = ecr.control(
n.params = 1L,
mutator.control = list(mutator.gauss.sd = 0.005),
monitor = myMonitor,
stopping.conditions = list(makeMaximumIterationsStoppingCondition(max.iter = 25L))
stopping.conditions = setupStoppingConditions(max.iter = 25L)
)

# do the evolutionary magic
Expand Down

0 comments on commit 03af39e

Please sign in to comment.