C# genetic algorithm
All right, I am trying very hard to figure out how to create the most simplistic genetic algorithm possible. I would like to consider this the "hello world" of C# genetic algorithms. I've looked at many examples, but so many go into the concept a little too far. Thus, I can't get ahold of the concept properly.
Could anyone guide me along in the setup or theory of such an algorithm, in C#? Code would be great, but understandable theory would be nice also.
Is this correct: genetic algorithms are used to find the most optimal path to a solution.. when the solution is already known? If not, help me out.
For my simple intro to GAs, I want to create a program that will solve: a + b = 4 . For integer solutions, there is a finite solution set (edit: or wait.. is there still an infinite?). But if I include floats, does that become infinite?
We talked about this in an earlier thread, and someone was going to post some code and theory on this exact question, but the thread was closed sadly. I would appreciate any help on this.
... a + b = 4 ...
[edited by - khaos on June 4, 2004 6:50:22 PM]
Using simple linear algebra, when you have a system of two variables and one equation, there is an infinite solution set. It doesn't matter if you only use integers, because that's just a subset of real numbers.
[edited by - Zipster on June 4, 2004 8:15:46 PM]
[edited by - Zipster on June 4, 2004 8:15:46 PM]
I always thought that conjunctive normal form was a nice easy starting point for genetic algorithms - i.e. finding solutions that make the conjunctive normal form statement true. It has a compact representation for individuals and a clear idea of what to use for the fitness function to propagate populations. I think that it can teach the very basic principles of genetic algorithms without getting very complex.
Magius
Magius
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement