View Single Post
  #15 (permalink)  
Old 08-10-2005, 03:05 PM
Posts: n/a
Default Re: Where can i find GeneticFPGA toolkit

Your code looks pretty good.

To answer your first question: If your answer is found in the first
population you just got lucky and you're done! Your correct in the
way you check for if the Error == 0 you stop, or the normalized value
would be infinite.

I have had similar issues with the answer diverging on some iterations.
What you need to do is have a fixed number of iterations like 100, That
way it won't ever be in an infinite loop. Another thing to try would be
use a larger population 6 is pretty small.

Another thing to do is keep track of you populations total error, if it
is not going down, maybe introduce more mutations. There are a bunch of
ways to try and get your population to evolve into the answer faster.

Since your know in this particular problem ax + b can not be greater
than c, you can use this to evaluate each random number in your
population. If you number violates this property, then just throw out
that number and get a new random number. This is kind of cheating,
since the repopulating should naturally weed out these answers. One
other option would be to give numbers that violate the ax+b = c a very
large Error, that way they just won't get repopulated.

One other thing to check is make sure you repopulation function is
running correctly. It is very easy to make a mistake in that function.

Good Luck


Reply With Quote