Important alert: (current site time 7/16/2013 2:19:43 AM EDT)
 

winzip icon

Big Genetic Algorithm - Problemsolver

Email
Submitted on: 5/4/2008 1:05:30 PM
By: Thierry 
Level: Intermediate
User Rating: By 22 Users
Compatibility: VB 6.0
Views: 20808
 
     This is a complete Genetic Algorithm Class full with all the features you will ever need. If you are new to Genetic Algorithms you will find extensive documentation (both in code and in separate textfiles) to help you understand what it is and how it works. Just run the examples and make out for youself if you want to learn more. You can use this class in your own projects to help you solve many kinds of problems. I provide 5 different examples to help you on your way. These examples are : - find the values in a formula - draw the biggest circle - fill a 3x3 grid so that rows and columns have the same sum - 0/1 knapsack problem - And of course : The traveling salesman All examples are kept simple and have their own explanation-textfiles. The list of features : (don't worry if you don't understand this at first, full explanation is provided in code and in separate textfiles) Supported encoding types : Binary, Alphabetic, Long integer and Double (real numbers) Selection methods : Rank, Roulette Wheel or Tournament Crossover methods : One point, Two point, Uniform, Half-uniform or Edge recombination Mutation : can be Fixed or Adaptive, numerical encoding can have mutation happen the usual way it's done with numbers, or bit-like Reproduction methods : Replace weakest, replace parents or replace random. Two Social disasters : Judgement Day or Packing Also supports : Random-Offspring generation, Crossover and mutation on full-gene or anywhere in a gene (and this for all encoding types !!) Let the class create it's own population or provide your own... All these settings are easy to modify using the GA-control panel and can be saved/loaded from a file. Complete statistics can be kept during the generation cycles and saved to a file. The only thing you need to do is choose an encoding type and provide a fitness function, my class does the rest. I am open to questions, suggestions, remarks and constructive critisism. Thierry email : thierry.van.mol@hotmail.com

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
7/19/2008 3:24:33 PMSpector

Not sure why there is 15 "5 globe" ratings and zero comments, but I guess I will be the first one.

This is an outstanding piece of source code! I never really understood how genetic algorithms worked before, but this has definitely opened my eyes. You did a great job of explaining the topic through your introduction and examples. The source code is also very clean and well commented. I look for to seeing more source code posts from you! Keep up the the excellent work!
(If this comment was disrespectful, please report it.)

 
8/11/2008 11:40:52 PMCobein

Hey Thierry, this is an incredible work, clean code, well commented, easy to follow, just exelent! five planets for this work
(If this comment was disrespectful, please report it.)

 
9/28/2008 11:06:55 AMYves MANDJEK

Huge work. Thank's for sharing. Very Useful
(If this comment was disrespectful, please report it.)

 
4/21/2009 3:42:24 AMULLI

Tnx a lot, Thierry, the Social Desaster algo (compressing) helped me a lot in one of my projects, which got stuck in a local optimum hole with too much inbreeding.
One thing which is not covered in depth is here is Foreign Immigration (the mechanism which apparently caused the extinction of the Neandertalers) and I am not sure, whether Coevolution (Island Evolution) has a similar effect; maybe it has.

Anyway, this work surely earnes more than five Golden Planets, but unfortunately more than five is not in the Voting Population Domain *g*.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.