This function is analog to `mlrMBO::mbo` and can be parallelized.

randomsearch(fun, design = NULL, max.evals = 20, max.execbudget = NULL,
target.fun.value = NULL, design.y.cols = NULL,
par.dir = "~/.randomsearch/", par.jobs = NULL)

## Arguments

fun |
[`smoof_function` ]
Fitness function to optimize.
For one dimensional target functions you can obtain a `smoof_function` by using `makeSingleObjectiveFunction` .
For multi dimensional functions use `makeMultiObjectiveFunction` .
It is possible to return even more information which will be stored
in the optimization path. To achieve this, simply append the attribute “extras”
to the return value of the target function. This has to be a named list of scalar values.
Each of these values will be stored additionally in the optimization path. |

design |
[`data.frame` ]
Initial design as data frame.
If the y-values are not already present in design, randomsearch will evaluate the points.
If the parameters have corresponding trafo functions, the design must not be transformed before it is passed!
Functions to generate designs are available in `ParamHelpers` : `generateDesign` , `generateGridDesign` , `generateRandomDesign` .
Default is `NULL` , which means no initial design. |

max.evals |
[`integer(1)` ]
Maximum number of evaulations of the objective functions.
Includes the initial design. |

max.execbudget |
[`integer(1)` ]
Exceution time budget in seconds. |

target.fun.value |
[`numeric(1)` ]
Traget function value. |

design.y.cols |
[`characer()` ]
The name of the column containing the function outcomes.
One for single-crit optimization.
Multiple for multi-crit optimization. |

par.dir |
[`character(1)` ]
Location to store parallel communication files. |

par.jobs |
[`integer(1)` ]
How many parallel jobs do jo want to run to evaluate the random search? |

## Value

[`OptPath`

## Examples

# simple 2d objective function
obj.fun = makeSingleObjectiveFunction(
fn = function(x) x[1]^2 + sin(x[2]),
par.set = makeNumericParamSet(id = "x", lower = -1, upper = 1, len = 2)
)
# start random search
res = randomsearch(obj.fun, max.evals = 10)