Lets say i run 10000 iterations on some data, twice. Now, the first time I do this I use both single point crossover and I choose three genese at random and mutate these to a random value in a certain range.
If on the second time I iterate my algorithm 10000 times I only use the three point gene mutation method, should my answers be similar but slightly better (which is what I am getting) or dramatically worse?
I was wondering if someone could tell me to see whether I am implementing my GA correctly.
There's no hard and fast rules it depends on the problem. Use whatever you get best results with.
You should really look at more appropriate sites like http://www.ai-junkie.com/ or http://www.ai-depot.com/
Presumably by an iteration you mean a generation?
Basically you're saying you get better performance not doing any crossover, just mutating?
Things you should try:
Vary number of crossovers
Vary mutation rate
Change you parent selection algorithm.
First of all GA is not analytically sounds meaning you can't show that the method works but you can prove in a certain instance that the method will yield soundness. (Besides the point just a interesting point to notice). Aften that said I will assume you are still having some selection phase in all kind of "iterations" and as dave_ I will assume an iteration is a SELECTION, CROSSOVER, MUTATION phase.
If you consider a GA the mutation rate is merely there to give the algorithm a possibility of changing it's mind. Meaning if you only mutate in the best case you are in the right place for the beginning and that minimum is defined so hard that mutation will not make it shake. In the worst case you mutate the solution to the extent you actually randomly jump around on the problem surface. In which case a GA will tend to give mutation that jump towards something good but to not extent assure such a claim. The actuall decending part is the crossover. The crossover retains part of the genome and will decend upon the correct solution. But without mutation it will also fail as it needs some means of randomly finding a path.
As to implementing correctly the questions actually more if you get a good result rather than the analytical points. But always consider your operators and make sure your algorithms better than a random walk. (eg. have a random algorithm for the same problem and make sure the random one doesn't bet you to often).