logo

유전 알고리즘

유전 알고리즘(GA)은 진화 알고리즘의 큰 부분에 속하는 적응형 휴리스틱 검색 알고리즘입니다. 유전 알고리즘은 자연 선택과 유전학의 아이디어를 기반으로 합니다. 이는 솔루션 공간에서 더 나은 성능을 보이는 영역으로 검색을 유도하기 위해 과거 데이터와 함께 제공된 무작위 검색을 지능적으로 활용하는 것입니다. 이는 일반적으로 최적화 문제 및 검색 문제에 대한 고품질 솔루션을 생성하는 데 사용됩니다.

유전 알고리즘은 자연 선택 과정을 시뮬레이션합니다. 이는 환경 변화에 적응할 수 있는 종들이 생존하고 번식하여 다음 세대로 넘어갈 수 있음을 의미합니다. 간단히 말해서 문제를 해결하기 위해 연속 세대의 개인 간의 적자 생존을 시뮬레이션합니다. 각 세대는 개인의 집단으로 구성됩니다. 각 개인은 검색 공간의 한 지점과 가능한 솔루션을 나타냅니다. 각 개인은 문자/정수/부동 소수점/비트의 문자열로 표시됩니다. 이 문자열은 염색체와 유사합니다.



유전 알고리즘의 기초

유전자 알고리즘은 집단 염색체의 유전적 구조 및 행동과의 유사성을 기반으로 합니다. 다음은 이러한 비유를 바탕으로 한 GA의 기초입니다.

  1. 인구 집단의 개인은 자원과 짝을 위해 경쟁합니다.
  2. 성공한(가장 적합한) 개체는 짝짓기를 통해 다른 개체보다 더 많은 자손을 낳습니다.
  3. 가장 적합한 부모의 유전자는 세대 전체에 걸쳐 전파됩니다. 즉, 때로는 부모가 어느 부모보다 나은 자손을 만드는 경우도 있습니다.
  4. 따라서 각 세대는 그들의 환경에 더 적합합니다.

검색 공간

개인의 인구는 검색 공간 내에서 유지됩니다. 각 개인은 주어진 문제에 대한 검색 공간의 솔루션을 나타냅니다. 각 개인은 구성 요소의 유한 길이 벡터(염색체와 유사)로 코딩됩니다. 이러한 가변 구성요소는 유전자와 유사합니다. 따라서 염색체(개체)는 여러 유전자(가변 구성 요소)로 구성됩니다.



피트니스 점수

체력 점수는 각 개인에게 주어집니다. 개인의 경쟁 능력을 보여줍니다. . 최적의 체력 점수(또는 최적에 가까운)를 가진 개인을 찾습니다.

GA는 체력 점수와 함께 n명의 개인(염색체/솔루션)의 개체군을 유지합니다. 체력 점수가 더 높은 개인에게는 다른 사람보다 번식할 기회가 더 많이 부여됩니다. 더 나은 체력 점수를 가진 개체가 선택되어 짝짓기를 하고 생산됩니다. 더 나은 자손 부모의 염색체를 결합함으로써. 인구 규모는 고정되어 있으므로 새로 도착하는 사람들을 위해 방을 만들어야 합니다. 따라서 일부 개체는 죽고 새로 도착한 개체로 대체되어 기존 개체군의 짝짓기 기회가 모두 소진되면 결국 새로운 세대가 탄생합니다. 다음 세대에 걸쳐 가장 적합한 솔루션이 사라지는 동안 더 나은 솔루션이 나올 것으로 기대됩니다.

각각의 새로운 세대는 이전 세대의 개체(해결책)보다 평균적으로 더 나은 유전자를 가지고 있습니다. 따라서 각각의 새로운 세대는 더 나은 부분적인 해결책 이전 세대보다. 이전 개체군에서 생산된 자손과 큰 차이가 없는 자손이 생산되면 개체군은 수렴됩니다. 알고리즘은 문제에 대한 일련의 솔루션으로 수렴된다고 합니다.



유전 알고리즘의 연산자

초기 생성이 생성되면 알고리즘은 다음 연산자를 사용하여 생성을 발전시킵니다.
1) 선택 연산자: 좋은 체력 점수를 가진 개인에게 우선권을 부여하고 그들의 유전자를 다음 세대에 전달할 수 있도록 하는 것이 아이디어입니다.
2) 크로스오버 오퍼레이터: 이는 개인 간의 교배를 나타냅니다. 선택 연산자를 사용하여 두 개인을 선택하고 교차 사이트를 무작위로 선택합니다. 그런 다음 이러한 교차 부위의 유전자가 교환되어 완전히 새로운 개체(자손)가 생성됩니다. 예를 들어 -

3) 돌연변이 연산자: 핵심 아이디어는 조기 수렴을 피하기 위해 인구의 다양성을 유지하기 위해 자손에 무작위 유전자를 삽입하는 것입니다. 예를 들어 -

b트리와 b트리

전체 알고리즘은 다음과 같이 요약될 수 있습니다.

1) Randomly initialize populations p 2) Determine fitness of population 3) Until convergence repeat:  a) Select parents from population  b) Crossover and generate new population  c) Perform mutation on new population  d) Calculate fitness for new population>

유전 알고리즘을 사용한 예제 문제 및 솔루션

대상 문자열이 주어지면 목표는 동일한 길이의 임의 문자열에서 시작하여 대상 문자열을 생성하는 것입니다. 다음 구현에서는 다음과 같은 비유가 이루어집니다.

  • 문자 A-Z, a-z, 0-9 및 기타 특수 기호는 유전자로 간주됩니다.
  • 이러한 문자에 의해 생성된 문자열은 염색체/용액/개체로 간주됩니다.

피트니스 점수 특정 인덱스에서 대상 문자열의 문자와 다른 문자 수입니다. 따라서 체력이 낮은 개인에게 더 많은 우선권이 부여됩니다.

C++




// C++ program to create target string, starting from> // random string using Genetic Algorithm> > #include> using> namespace> std;> > // Number of individuals in each generation> #define POPULATION_SIZE 100> > // Valid Genes> const> string GENES =>'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP'>> 'QRSTUVWXYZ 1234567890, .-;:_!'#%&/()=?@${[]}'>;> > // Target string to be generated> const> string TARGET =>'I love techcodeview.com'>;> > // Function to generate random numbers in given range> int> random_num(>int> start,>int> end)> {> >int> range = (end-start)+1;> >int> random_int = start+(>rand>()%range);> >return> random_int;> }> > // Create random genes for mutation> char> mutated_genes()> {> >int> len = GENES.size();> >int> r = random_num(0, len-1);> >return> GENES[r];> }> > // create chromosome or string of genes> string create_gnome()> {> >int> len = TARGET.size();> >string gnome =>''>;> >for>(>int> i = 0;i gnome += mutated_genes(); return gnome; } // Class representing individual in population class Individual { public: string chromosome; int fitness; Individual(string chromosome); Individual mate(Individual parent2); int cal_fitness(); }; Individual::Individual(string chromosome) { this->염색체 = 염색체; 피트니스 = cal_fitness(); }; // 교배를 수행하고 새로운 자손을 생산합니다 Individual Individual::mate(Individual par2) { // 자손의 염색체 string child_chromosome = ''; int len ​​= 염색체.크기(); for(int i = 0;i { // 무작위 확률 float p = random_num(0, 100)/100; // prob가 0.45보다 작으면 // 부모 1의 유전자를 삽입합니다. if(p<0.45) child_chromosome += chromosome[i]; // if prob is between 0.45 and 0.90, insert // gene from parent 2 else if(p <0.90) child_chromosome += par2.chromosome[i]; // otherwise insert random gene(mutate), // for maintaining diversity else child_chromosome += mutated_genes(); } // create new Individual(offspring) using // generated chromosome for offspring return Individual(child_chromosome); }; // Calculate fitness score, it is the number of // characters in string which differ from target // string. int Individual::cal_fitness() { int len = TARGET.size(); int fitness = 0; for(int i = 0;i { if(chromosome[i] != TARGET[i]) fitness++; } return fitness; }; // Overloading bool operator<(const Individual &ind1, const Individual &ind2) { return ind1.fitness } // Driver code int main() { srand((unsigned)(time(0))); // current generation int generation = 0; vector population; bool found = false; // create initial population for(int i = 0;i { string gnome = create_gnome(); population.push_back(Individual(gnome)); } while(! found) { // sort the population in increasing order of fitness score sort(population.begin(), population.end()); // if the individual having lowest fitness score ie. // 0 then we know that we have reached to the target // and break the loop if(population[0].fitness <= 0) { found = true; break; } // Otherwise generate new offsprings for new generation vector new_generation; // Perform Elitism, that mean 10% of fittest population // goes to the next generation int s = (10*POPULATION_SIZE)/100; for(int i = 0;i new_generation.push_back(population[i]); // From 50% of fittest population, Individuals // will mate to produce offspring s = (90*POPULATION_SIZE)/100; for(int i = 0;i { int len = population.size(); int r = random_num(0, 50); Individual parent1 = population[r]; r = random_num(0, 50); Individual parent2 = population[r]; Individual offspring = parent1.mate(parent2); new_generation.push_back(offspring); } population = new_generation; cout<< 'Generation: ' << generation << ' '; cout<< 'String: '<< population[0].chromosome <<' '; cout<< 'Fitness: '<< population[0].fitness << ' '; generation++; } cout<< 'Generation: ' << generation << ' '; cout<< 'String: '<< population[0].chromosome <<' '; cout<< 'Fitness: '<< population[0].fitness << ' '; }>

>

각주 인하

>

자바




여러 테이블에서 SQL 선택

import> java.util.ArrayList;> import> java.util.Collections;> import> java.util.List;> import> java.util.Random;> > public> class> GeneticAlgorithm {> >// Number of individuals in each generation> >private> static> final> int> POPULATION_SIZE =>100>;> > >// Valid Genes> >private> static> final> String GENES =>'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890, .-;:_!'#%&/()=?@${[]}'>;> > >// Target string to be generated> >private> static> final> String TARGET =>'I love techcodeview.com'>;> > >// Function to generate random numbers in given range> >private> static> int> randomNum(>int> start,>int> end) {> >Random rand =>new> Random();> >return> rand.nextInt(end - start +>1>) + start;> >}> > >// Create random genes for mutation> >private> static> char> mutatedGenes() {> >int> len = GENES.length();> >int> r = randomNum(>0>, len ->1>);> >return> GENES.charAt(r);> >}> > >// Create chromosome or string of genes> >private> static> String createGnome() {> >int> len = TARGET.length();> >StringBuilder gnome =>new> StringBuilder();> >for> (>int> i =>0>; i gnome.append(mutatedGenes()); return gnome.toString(); } // Class representing individual in population private static class Individual implements Comparable { String chromosome; int fitness; Individual(String chromosome) { this.chromosome = chromosome; fitness = calFitness(); } // Perform mating and produce new offspring Individual mate(Individual par2) { StringBuilder childChromosome = new StringBuilder(); int len = chromosome.length(); for (int i = 0; i // random probability float p = randomNum(0, 100) / 100f; // if prob is less than 0.45, insert gene from parent 1 if (p <0.45) childChromosome.append(chromosome.charAt(i)); // if prob is between 0.45 and 0.90, insert gene from parent 2 else if (p <0.90) childChromosome.append(par2.chromosome.charAt(i)); // otherwise insert random gene(mutate), for maintaining diversity else childChromosome.append(mutatedGenes()); } // create new Individual(offspring) using generated chromosome for offspring return new Individual(childChromosome.toString()); } // Calculate fitness score, it is the number of characters in string which differ from target string private int calFitness() { int len = TARGET.length(); int fitness = 0; for (int i = 0; i if (chromosome.charAt(i) != TARGET.charAt(i)) fitness++; } return fitness; } @Override public int compareTo(Individual o) { return Integer.compare(this.fitness, o.fitness); } } // Driver code public static void main(String[] args) { // current generation int generation = 0; List population = new ArrayList(); boolean found = false; // create initial population for (int i = 0; i String gnome = createGnome(); population.add(new Individual(gnome)); } while (!found) { // sort the population in increasing order of fitness score Collections.sort(population); // if the individual having lowest fitness score i.e. 0 then we know that we have reached to the target // and break the loop if (population.get(0).fitness <= 0) { found = true; break; } // Otherwise generate new offsprings for new generation List newGeneration = new ArrayList(); // Perform Elitism, that mean 10% of fittest population goes to the next generation int s = (10 * POPULATION_SIZE) / 100; for (int i = 0; i newGeneration.add(population.get(i)); // From 50% of fittest population, Individuals will mate to produce offspring s = (90 * POPULATION_SIZE) / 100; for (int i = 0; i int len = population.size(); int r = randomNum(0, 50); Individual parent1 = population.get(r); r = randomNum(0, 50); Individual parent2 = population.get(r); Individual offspring = parent1.mate(parent2); newGeneration.add(offspring); } population = newGeneration; System.out.print('Generation: ' + generation + ' '); System.out.print('String: ' + population.get(0).chromosome + ' '); System.out.println('Fitness: ' + population.get(0).fitness); generation++; } System.out.print('Generation: ' + generation + ' '); System.out.print('String: ' + population.get(0).chromosome + ' '); System.out.println('Fitness: ' + population.get(0).fitness); } }>

>

>

파이썬3




# Python3 program to create target string, starting from> # random string using Genetic Algorithm> > import> random> > # Number of individuals in each generation> POPULATION_SIZE>=> 100> > # Valid genes> GENES>=> '''abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP> QRSTUVWXYZ 1234567890, .-;:_!'#%&/()=?@${[]}'''> > # Target string to be generated> TARGET>=> 'I love techcodeview.com'> > class> Individual(>object>):> >'''> >Class representing individual in population> >'''> >def> __init__(>self>, chromosome):> >self>.chromosome>=> chromosome> >self>.fitness>=> self>.cal_fitness()> > >@classmethod> >def> mutated_genes(>self>):> >'''> >create random genes for mutation> >'''> >global> GENES> >gene>=> random.choice(GENES)> >return> gene> > >@classmethod> >def> create_gnome(>self>):> >'''> >create chromosome or string of genes> >'''> >global> TARGET> >gnome_len>=> len>(TARGET)> >return> [>self>.mutated_genes()>for> _>in> range>(gnome_len)]> > >def> mate(>self>, par2):> >'''> >Perform mating and produce new offspring> >'''> > ># chromosome for offspring> >child_chromosome>=> []> >for> gp1, gp2>in> zip>(>self>.chromosome, par2.chromosome):> > ># random probability> >prob>=> random.random()> > ># if prob is less than 0.45, insert gene> ># from parent 1> >if> prob <>0.45>:> >child_chromosome.append(gp1)> > ># if prob is between 0.45 and 0.90, insert> ># gene from parent 2> >elif> prob <>0.90>:> >child_chromosome.append(gp2)> > ># otherwise insert random gene(mutate),> ># for maintaining diversity> >else>:> >child_chromosome.append(>self>.mutated_genes())> > ># create new Individual(offspring) using> ># generated chromosome for offspring> >return> Individual(child_chromosome)> > >def> cal_fitness(>self>):> >'''> >Calculate fitness score, it is the number of> >characters in string which differ from target> >string.> >'''> >global> TARGET> >fitness>=> 0> >for> gs, gt>in> zip>(>self>.chromosome, TARGET):> >if> gs !>=> gt: fitness>+>=> 1> >return> fitness> > # Driver code> def> main():> >global> POPULATION_SIZE> > >#current generation> >generation>=> 1> > >found>=> False> >population>=> []> > ># create initial population> >for> _>in> range>(POPULATION_SIZE):> >gnome>=> Individual.create_gnome()> >population.append(Individual(gnome))> > >while> not> found:> > ># sort the population in increasing order of fitness score> >population>=> sorted>(population, key>=> lambda> x:x.fitness)> > ># if the individual having lowest fitness score ie.> ># 0 then we know that we have reached to the target> ># and break the loop> >if> population[>0>].fitness <>=> 0>:> >found>=> True> >break> > ># Otherwise generate new offsprings for new generation> >new_generation>=> []> > ># Perform Elitism, that mean 10% of fittest population> ># goes to the next generation> >s>=> int>((>10>*>POPULATION_SIZE)>/>100>)> >new_generation.extend(population[:s])> > ># From 50% of fittest population, Individuals> ># will mate to produce offspring> >s>=> int>((>90>*>POPULATION_SIZE)>/>100>)> >for> _>in> range>(s):> >parent1>=> random.choice(population[:>50>])> >parent2>=> random.choice(population[:>50>])> >child>=> parent1.mate(parent2)> >new_generation.append(child)> > >population>=> new_generation> > >print>(>'Generation: {} String: {} Fitness: {}'>.> >format>(generation,> >''.join(population[>0>].chromosome),> >population[>0>].fitness))> > >generation>+>=> 1> > > >print>(>'Generation: {} String: {} Fitness: {}'>.> >format>(generation,> >''.join(population[>0>].chromosome),> >population[>0>].fitness))> > if> __name__>=>=> '__main__'>:> >main()>

>

>

씨#




using> System;> using> System.Collections.Generic;> using> System.Linq;> > public> class> GeneticAlgorithm> {> >// Number of individuals in each generation> >private> const> int> POPULATION_SIZE = 100;> > >// Valid Genes> >private> const> string> GENES =>'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP'> +> >'QRSTUVWXYZ 1234567890, .-;:_!'#%&/()=?@${[]}'>;> > >// Target string to be generated> >private> const> string> TARGET =>'I love techcodeview.com'>;> > >private> static> readonly> Random random =>new> Random();> > >// Function to generate random numbers in given range> >private> static> int> RandomNum(>int> start,>int> end)> >{> >return> random.Next(start, end + 1);> >}> > >// Create random genes for mutation> >private> static> char> MutatedGenes()> >{> >int> len = GENES.Length;> >int> r = RandomNum(0, len - 1);> >return> GENES[r];> >}> > >// Create chromosome or string of genes> >private> static> string> CreateGnome()> >{> >int> len = TARGET.Length;> >char>[] gnome =>new> char>[len];> >for> (>int> i = 0; i { gnome[i] = MutatedGenes(); } return new string(gnome); } // Class representing individual in population private class Individual { public string Chromosome { get; } public int Fitness { get; } public Individual(string chromosome) { Chromosome = chromosome; Fitness = CalculateFitness(); } // Calculate fitness score, it is the number of // characters in string which differ from target string. private int CalculateFitness() { return Chromosome.Zip(TARGET, (a, b) =>a == b ? 0 : 1).합계(); } // 짝짓기를 수행하고 새로운 자손을 생산합니다. public Individual Mate(Individual parent2) { char[] childCromosome = new char[Chromosome.Length]; for (int i = 0; i { double p = 무작위.NextDouble(); if (p<0.45) childChromosome[i] = Chromosome[i]; else if (p <0.90) childChromosome[i] = parent2.Chromosome[i]; else childChromosome[i] = MutatedGenes(); } return new Individual(new string(childChromosome)); } } // Overloading private class FitnessComparer : IComparer { public int Compare(Individual ind1, Individual ind2) { return ind1.Fitness.CompareTo(ind2.Fitness); } } // Driver code public static void Main() { // current generation int generation = 0; List population = new List(); bool found = false; // create initial population for (int i = 0; i { string gnome = CreateGnome(); population.Add(new Individual(gnome)); } while (!found) { // sort the population in increasing order of fitness score population.Sort(new FitnessComparer()); // if the individual having lowest fitness score ie. // 0 then we know that we have reached the target // and break the loop if (population[0].Fitness == 0) { found = true; break; } // Otherwise generate new offsprings for new generation List newGeneration = new List(); // Perform Elitism, that means 10% of fittest population // goes to the next generation int s = (10 * POPULATION_SIZE) / 100; for (int i = 0; i newGeneration.Add(population[i]); // From 50% of fittest population, Individuals // will mate to produce offspring s = (90 * POPULATION_SIZE) / 100; for (int i = 0; i { int len = population.Count; int r = RandomNum(0, 50); Individual parent1 = population[r]; r = RandomNum(0, 50); Individual parent2 = population[r]; Individual offspring = parent1.Mate(parent2); newGeneration.Add(offspring); } population = newGeneration; Console.WriteLine('Generation: ' + generation + ' ' + 'String: ' + population[0].Chromosome + ' ' + 'Fitness: ' + population[0].Fitness); generation++; } Console.WriteLine('Generation: ' + generation + ' ' + 'String: ' + population[0].Chromosome + ' ' + 'Fitness: ' + population[0].Fitness); } }>

>

>

자바스크립트

세트 대 지도




// Number of individuals in each generation> const POPULATION_SIZE = 100;> > // Valid Genes> const GENES =>'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP'> +> >'QRSTUVWXYZ 1234567890, .-;:_!'#%&/()=?@${[]}'>;> > // Target string to be generated> const TARGET =>'I love techcodeview.com'>;> > // Function to generate random numbers in given range> function> RandomNum(start, end) {> >return> Math.floor(Math.random() * (end - start + 1)) + start;> }> > // Create random genes for mutation> function> MutatedGenes() {> >let len = GENES.length;> >let r = RandomNum(0, len - 1);> >return> GENES.charAt(r);> }> > // Create chromosome or string of genes> function> CreateGnome() {> >let len = TARGET.length;> >let gnome =>''>;> >for> (let i = 0; i gnome += MutatedGenes(); } return gnome; } // Class representing individual in population class Individual { constructor(chromosome) { this.Chromosome = chromosome; this.Fitness = this.CalculateFitness(); } // Calculate fitness score, it is the number of // characters in string which differ from target string. CalculateFitness() { let fitness = 0; for (let i = 0; i FitnessComparer.Compare(a, b)); // 체력 점수가 가장 낮은 개인의 경우, 즉. // 0 그러면 목표에 도달했음을 알 수 있으며 // 루프를 중단합니다. if (population[0].Fitness === 0) {found = true; 부서지다; } // 그렇지 않으면 새로운 세대를 위한 새로운 자손을 생성합니다 let newGeneration = []; // 엘리트주의를 수행합니다. 즉, 적자 인구의 10%가 // 다음 세대로 전달됨을 의미합니다. let s = Math.floor((10 * POPULATION_SIZE) / 100); for (let i = 0; i newGeneration.push(population[i]); // 적자 인구의 50%에서 개체는 // 짝짓기를 통해 자손을 생산합니다 s = Math.floor((90 * POPULATION_SIZE) / 100); for (let i = 0; i let r = RandomNum(0, 50); let parent1 = 인구[r]; r = RandomNum(0, 50); let parent2 = 인구[r]; let offspring = parent1.Mate( parent2); newGeneration.push(offspring); } 인구 = newGeneration; console.log('세대: ' + 세대 + ' ' + '문자열: ' + 인구[0].염색체 + ' ' + '피트니스: ' + 인구[0].Fitness) 생성++ } console.log('세대: ' + 세대 + ' ' + '문자열: ' + Population[0].Chromosome + ' ' + 'Fitness: ' + Population[0].Fitness) } // 메인 함수 Main() 실행>

java에서 csv 파일 읽기
>

>

산출:

Generation: 1 String: tO{'-?=jH[k8=B4]Oe@} Fitness: 18 Generation: 2 String: tO{'-?=jH[k8=B4]Oe@} Fitness: 18 Generation: 3 String: .#lRWf9k_Ifslw #O$k_ Fitness: 17 Generation: 4 String: .-1Rq?9mHqk3Wo]3rek_ Fitness: 16 Generation: 5 String: .-1Rq?9mHqk3Wo]3rek_ Fitness: 16 Generation: 6 String: A#ldW) #lIkslw cVek) Fitness: 14 Generation: 7 String: A#ldW) #lIkslw cVek) Fitness: 14 Generation: 8 String: (, o x _x%Rs=, 6Peek3 Fitness: 13  .   .   .  Generation: 29 String: I lope Geeks#o, Geeks Fitness: 3 Generation: 30 String: I loMe GeeksfoBGeeks Fitness: 2 Generation: 31 String: I love Geeksfo0Geeks Fitness: 1 Generation: 32 String: I love Geeksfo0Geeks Fitness: 1 Generation: 33 String: I love Geeksfo0Geeks Fitness: 1 Generation: 34 String: I love techcodeview.com Fitness: 0>

메모: 매번 알고리즘은 임의의 문자열로 시작하므로 출력이 다를 수 있습니다.

출력에서 볼 수 있듯이, 우리의 알고리즘은 때때로 로컬 최적 솔루션에 멈춰 있습니다. 이는 피트니스 점수 계산 알고리즘을 업데이트하거나 돌연변이 및 교차 연산자를 조정하여 더욱 개선할 수 있습니다.

유전 알고리즘을 사용하는 이유

  • 그들은 견고하다
  • 넓은 공간 상태에 대한 최적화를 제공합니다.
  • 기존 AI와 달리 입력이 약간 변경되거나 노이즈가 있어도 중단되지 않습니다.

유전 알고리즘의 응용

유전자 알고리즘에는 다양한 응용 분야가 있으며 그 중 일부는 다음과 같습니다.

  • 순환 신경망
  • 돌연변이 테스트
  • 코드 깨기
  • 필터링 및 신호 처리
  • 퍼지 규칙 기반 등 학습