mutation: Mutation

Description Usage Arguments Details

View source: R/mutation.R

Description

mutation is to do mutation for the offspring after breeding.

Usage

1
mutation(parent_1, parent_2, offspring, m)

Arguments

parent_1, parent_2

Numeric vectors with binary 0/1 elements. Should be of same length.

offspring

A Numeric vector generated by crossover and/or other genetic operators.

m

Mutation rate: a numeric value between 0 and 1. By default 0.01.

Details

Changes an offspring chromosome by randomly introducing one or more alleles in loci where those alleles are not seen in the corresponding loci of either parent chromosome.


zhrlin/GA documentation built on Dec. 23, 2019, 6:33 p.m.