You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mutation is a genetic operator used to maintain genetic diversity from one generation of a population of genetic algorithm chromosomes to the next.
Mutation
A mutation here may happen on zero or more positions in a chromosome. It is going to check every position and by a given probability it will decide if a mutation will occur.
A mutation is the change from 0 to 1 or from 1 to 0.
Note: Some tests are random. If you think your algorithm is correct but the result fails, trying again should work.
*/
export function mutate(chromosome:string, p:number):string {