Saturday, May 23, 2015

alterations

As of now I'm finishing up my first genetic algorithm implementation. The actual structure was not hard, it was the small details that drove me up the wall. I had a problem that when I would run the program with vectors and individuals being tested , I would get vectors that were superior to the others in the generation. The problem that I had, well one of them, was that after say three iterations the clones would start to appear. After so many iterations ,I would have nothing but clones.
Part of the Generation Creation in the Iteration process... say that three times... all the individuals in the generation go through a process in which some are mutated. i.e some random variable in the vector is altered in some way.
The other problem that I was running into was that when the program would mutate a vector, every clone of that vector would also change. So these two problems really put a wrench in the cogs for my program. With a generation of clones and every change to one would effect them all, my program didn't have a chance.
Today I altered the structure of the data so that instead of ...ps i`m using java... my a class to hold the vector, its fitness, the time it took to run , bla bla bla, I have a class that just hold arrays of floats and doubles.
As far as the clones, I think when I fixed the problem with the references I fixed the problem with the clones. I have run the program and now I have a different problem, but one that can easily be fixed.
later ( 0 c 0 ) \m/

No comments:

Post a Comment