Print

Print


Hello,

I am new to ECJ and i am trying to use GA's to solve a 3D puzzle. I have 
written code to output the puzzle genome into a file which can be read by a 
opengl program written in c.  I have debugged my fitness function and my 
openGL program and am fairly certain they should be working correctly.  
When i run the program i was hoping to see the puzzle correctly solved but 
when looked at the visualisation it is not.

I think i have narrowed it down to ECJ constantly overwriting the data in the 
text file when it creates individuals.  To get round this i have created a 
variable of type BitVectorIndividual and overwrite it if the new individuals 
fitness is better.  Then i will be able to just output that individuals data to the 
file so i can see a correct solution. When i compare individuals it seems to not 
work a lot of the time and overwrite the best individual even if it is worse.

Does ECJ have some sort of built in way to access the best individuals 
Genome or can you point me in the right direction as to how i can retrieve it.

Thanks in advance,

Matt