Friday, March 25, 2005

A Little Genetic Algorithm Simulation

Hello, my friends!!!

Today I'm going to show you a very simple GA Simulation that I made here in my house using my PC - a Pentium III 700 MHz with Windows 98 and 256 MB RAM, my PC is like the girl that no guy wants do dance in a party, but anyway...

I simulated the function: f(x1, x2) = 21.5 + x1*sin(4*x1*pi) + x2*sin(20*x2*pi)
x1 = [-3, 12.1]
x2 = [4.1, 5.8]

I used two codifications to my GA, i.e, Binary and Real Numbers. And some different types of genetic operators( crossover, mutation and selection, later I'll explain how each one works).

If you are a GA enthusiast, try by yourself to optimize the function above.

Here is the Graph. The horizontal axis is the number of generations and the other is the Fitness' arithmetic mean.

Free Image Hosting at

Here is a Map Graph that shows you the values that the function f(x1, x2) has inside the two intervals of it variables.

Free Image Hosting at

See You!!


Post a Comment

Links to this post:

Create a Link

<< Home

Charles Darwin Has A Posse Check Google Page Rank