Quantcast

Chromosome fitness value calculated only once

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Chromosome fitness value calculated only once

Adam Lewandowski
Does a chromosomes fitness value only ever get calculated once? That's
the behavior I'm seeing and is confirmed by browsing through the source
code for Chromosome. If this is the case, how do Gene mutations (or
other genetic operators for that matter) ever have an effect? I see the
mutation function being called on several genes, but because the
Chromosome's m_fitnessValue has already been calculated all calls to
Chromosome.getFitnessValue() return the cached value and do not
re-evaluate the fitness based on gene mutations. Am I missing something
here?

Thanks,
Adam Lewandowski


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
jgap-devl mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-devl
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Chromosome fitness value calculated only once

Klaus Meffert
Hello Adam,

there now is a bug with no. 1368072 opened for that. I already fixed it and
will release a new version, JGAP 2.5, soon.
Until then you could change the code in class org.jgap.Chromosome, method
getFitnessValue(): Just replace the whole logic within the method with:

   return calcFitnessValue();

This will do the job but is not that performant, so a more sophisticated bug
fix would be appropriate.

Best

Klaus

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Adam Lewandowski
> Sent: Monday, November 28, 2005 9:52 PM
> To: [hidden email]
> Subject: [jgap-devl] Chromosome fitness value calculated only once
>
> Does a chromosomes fitness value only ever get calculated
> once? That's the behavior I'm seeing and is confirmed by
> browsing through the source code for Chromosome. If this is
> the case, how do Gene mutations (or other genetic operators
> for that matter) ever have an effect? I see the mutation
> function being called on several genes, but because the
> Chromosome's m_fitnessValue has already been calculated all calls to
> Chromosome.getFitnessValue() return the cached value and do
> not re-evaluate the fitness based on gene mutations. Am I
> missing something here?
>
> Thanks,
> Adam Lewandowski

>




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
jgap-devl mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-devl
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Chromosome fitness value calculated only once

Klaus Meffert
In reply to this post by Adam Lewandowski
Hello Adam,

An addition to my previous mail: The logic in Chromosome itself should be
correct. But in other classes the fitness value of a genetically operated
chromosome (e.g. a mutated one) should be reset, which is buggy.

Best

Klaus

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Adam Lewandowski
> Sent: Monday, November 28, 2005 9:52 PM
> To: [hidden email]
> Subject: [jgap-devl] Chromosome fitness value calculated only once
>
> Does a chromosomes fitness value only ever get calculated
> once? That's the behavior I'm seeing and is confirmed by
> browsing through the source code for Chromosome. If this is
> the case, how do Gene mutations (or other genetic operators
> for that matter) ever have an effect? I see the mutation
> function being called on several genes, but because the
> Chromosome's m_fitnessValue has already been calculated all calls to
> Chromosome.getFitnessValue() return the cached value and do
> not re-evaluate the fitness based on gene mutations. Am I
> missing something here?
>
> Thanks,
> Adam Lewandowski
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep
> through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  
> DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> jgap-devl mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jgap-devl
>




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
jgap-devl mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-devl
Loading...