geneOptim: Quick & dirty genetic algorithm

Description Usage Arguments Value Examples

Description

Minimization of a function using a quick & dirty algorithm.

Usage

1
2
geneOptim(fn, ..., N = 100, G = 500, min_val, max_val, p_mut = 0.25,
  w_mut = 0.2, p_cross = 0.1, n_cores = 1, .packages = NULL)

Arguments

fn

Function to minimize The ouput of the function should be a single numeric value.

N

Number of individual in the population (default: 100).

G

Number of "generations". A generation actually corresponds to a reproductive event between the best two individuals of a group of four individuals randomly chosen in the population (default: 500).

min_val

A vector of the minimum acceptable values for each gene.

max_val

A vector of the maximum acceptable values for each gene.

p_mut

Probability of a gene mutating (default: 0.25).

w_mut

Maximum variation allowed through mutation (default: 0.25).

p_cross

Probability of crossover (default: 0.1).

n_cores

Number of available cores for parallel computation (default: 1).

Value

A matrix of the final population.

Examples

1
#TODO

swarm-lab/geneOptimQAD documentation built on May 30, 2019, 9:35 p.m.