gaRWselection: Roulette Wheel Selection

Description Usage Arguments Examples

View source: R/gaRWselection.R View source: R/mate.R

Description

In Roulette Wheel Selection method, the chromosomes are selected based on their probabilities that are proportional to their fitness value. whole population in partitioned on the wheel and each sector represents an individual. The proportion of individual's fitness to the total fitness values of whole population decides the probability of selection of that individual in the next generation.

Usage

1
gaRWselection(population, fitnessVec, eliteRate)

Arguments

population

a matrix of size n*p

fitnessVec

a vector with length n

eliteRate

a proportion between zero and one

Examples

1
2
3
4
5
6
numVar <- 6
N <- 50
population <- matrix(rbinom(numVar*N, 1, prob = 0.5), N, numVar)
fitnessVec <- seq(15, 50, length.out=50)
eliteRate <- 0.05
gaRWselectio(population, fitnessVec, eliteRate)

dchen49/GA documentation built on May 3, 2019, 6:43 p.m.