Questions tagged [genetic-algorithm]

A genetic algorithm (GA) is a search heuristic that mimics the process of natural evolution.

A genetic algorithm is an optimization heuristic that is inspired by the principles that drive biological evolution: variation (resulting from mutation and recombination), inheritance, and selection. In comparison to traditional search methods such as gradient descent and hill climbing, genetic algorithms have the ability to escape from local minima/maxima.

The functionality of genetic algorithms is defined by genetic operators and their strategies: generation of initial populations, , , candidate solutions, health assessment (fitness function). There are more different approaches to design the genetic operators and it's reasonable for different types of optimization tasks. This supports a high flexibility of genetic algorithms.

The population is defined as a collection of individuals with separately stored genetic information. An individual member of this population is defined as a set of proposed decisions, where a decision is a chromosome. After estimation, a GA will follow the most efficient chromosomes. This means that these candidates of solutions are evaluated using a fitness function that in some way scores them on their ability to solve the desired problem. This fitness calculation can be either single or multi-objective depending upon complexity of the problem being studied. Higher scoring solutions have "offspring," which are the result of occasionally applying random changes (mutations) to them. Often, recombination is also used, by mixing two or more high-scoring solutions together.

The powerfulness of GA can also be seen using a different type of population coding and symbol model presentation. In the model, we can easy represent different real nature values of characteristics in digital presentation. So, we can manipulate the values of different natures within a single goal (fitness function).

Genetic algorithms are a subset of the category. Traditionally, genetic algorithms represent solutions to the optimization problem as a series of 0s and 1s, although more recent approaches have involved more complex representations.

The related term refers to algorithms in which evolution is applied to code rather than to a more abstract representation of a solution.

Some examples of popular multi-objective genetic algorithms: NSGA-II, NSGA-III, SPEA-II, DE

2095 questions
232
votes
34 answers

What are good examples of genetic algorithms/genetic programming solutions?

Genetic algorithms (GA) and genetic programming (GP) are interesting areas of research. I'd like to know about specific problems you have solved using GA/GP and what libraries/frameworks you used if you didn't roll your own. Questions: What…
140
votes
8 answers

When should I use genetic algorithms as opposed to neural networks?

Is there a rule of thumb (or set of examples) to determine when to use genetic algorithms as opposed to neural networks (and vice-versa) to solve a problem? I know there are cases in which you can have both methods mixed, but I am looking for a…
65
votes
5 answers

What is the difference between genetic and evolutionary algorithms?

Is there a difference between genetic algorithms and evolutionary algorithms? I have read multiple papers, talking about genetic or evolutionary algorithms, and while very similar, I think they may not be the same thing.
Goles
  • 11,599
  • 22
  • 79
  • 140
60
votes
12 answers

Genetic Programming in C#

I've been looking for some good genetic programming examples for C#. Anyone knows of good online/book resources? Wonder if there is a C# library out there for Evolutionary/Genetic programming?
Mac
  • 2,693
  • 7
  • 36
  • 44
58
votes
9 answers

How to perform a bitwise operation on floating point numbers

I tried this: float a = 1.4123; a = a & (1 << 3); I get a compiler error saying that the operand of & cannot be of type float. When I do: float a = 1.4123; a = (int)a & (1 << 3); I get the program running. The only thing is that the bitwise…
Rohit Banga
  • 18,458
  • 31
  • 113
  • 191
55
votes
10 answers

How should I Test a Genetic Algorithm

I have made a quite few genetic algorithms; they work (they find a reasonable solution quickly). But I have now discovered TDD. Is there a way to write a genetic algorithm (which relies heavily on random numbers) in a TDD way? To pose the question…
49
votes
12 answers

cool project to use a genetic algorithm for?

I'm looking for a practical application to use a genetic algorithm for. Some things that have thought of are: Website interface optimization Vehicle optimization with a physics simulator Genetic programming Automatic test case generation But none…
Ryan
  • 15,016
  • 6
  • 48
  • 50
47
votes
2 answers

Genetic Algorithms and multi-objectives optimization on PYTHON : libraries/tools to use?

I am scanning the internet for libraries available to use GA with potential development for multi-objective algorithms like NSGAII for Python. Do you have any suggestion? Here is what I have so far: Pyevolve : Well documented but doesn't include…
Serge
  • 1,018
  • 2
  • 11
  • 14
43
votes
11 answers

What are some impressive algorithms or software in the world of AI?

I have always loved the idea of AI and evolutionary algorithms. Unfortunately, as we all know, the field hasn't developed nearly as fast as expected in the early days. What I am looking for are some examples that have the "wow"…
Alex
  • 3,099
  • 6
  • 41
  • 56
41
votes
14 answers

Genetic algorithm resource

Lately I'm interested in the topic of genetic algorithms, but I couldn't find any good resource. If you know any good resource, book or a site I would appreciate it. I have solid knowledge of algorithms and Artificial Intelligence but I'm looking…
Siblja
  • 859
  • 2
  • 12
  • 19
39
votes
7 answers

Have you ever used a genetic algorithm in real-world applications?

I was wondering how common it is to find genetic algorithm approaches in commercial code. It always seemed to me that some kinds of schedulers could benefit from a GA engine, as a supplement to the main algorithm.
mseery
  • 1,404
  • 2
  • 16
  • 26
39
votes
14 answers

Roulette Selection in Genetic Algorithms

Can anyone provide some pseudo code for a roulette selection function? How would I implement this: I don't really understand how to read this math notation. I never took any probability or statistics.
35
votes
6 answers

What are the differences between genetic algorithms and genetic programming?

I would like to have a simple explanation of the differences between genetic algorithms and genetic programming (without too much programming jargon). Examples would also be appreciated. Apparently, in genetic programming, solutions are computer…
bjrnt
  • 2,552
  • 3
  • 27
  • 38
34
votes
3 answers

Is there an efficient algorithm for segmentation of handwritten text?

I want to automatically divide an image of ancient handwritten text by lines (and by words in future). The first obvious part is preprocessing the image... I'm just using a simple digitization (based on brightness of pixel). After that I store data…
Ernado
  • 641
  • 1
  • 6
  • 14
32
votes
8 answers

Code generation by genetic algorithms

Evolutionary programming seems to be a great way to solve many optimization problems. The idea is very easy and the implementation does not make problems. I was wondering if there is any way to evolutionarily create a program in ruby/python script…
1
2 3
99 100