Re: [jgap-users] Can Chromosome have an 'attachment' much like 'java.nio.SelectionKey'
Brought to you by:
klausikm
From: Neil R. <ne...@bl...> - 2003-03-12 04:46:41
|
Hi Richard, I have mixed feelings about this. On the one hand, it's obviously very easy to implement and virtually risk-free from a code perspective. But on the other, I wonder if it goes against the spirit of the genetic algorithm. After all, a Chromosome's fitness function is supposed to be based on the performance of its genes, not on external state that is piggy-backed upon it. In your particular case, I believe you want to associate fitness values with Chromosomes because of the inflexibility of the fitness function in the current release candidate. I would argue that the solution is for us to fix the fitness function (which it has been in CVS, although not in an official release as of yet) rather than implementing this Chromosome attachment. So I guess my real question is whether you think there is a valid use case for this feature, other than trying to workaround an admitted failing of the current fitness function implementation? If so, then it is probably worth consideration. Any thoughts you might have are much appreciated, and I'll continue thinking about it as well. Thanks, Neil On Wed, 12 Mar 2003 ric...@ca... wrote: > Dear All, > > Would it be possible to give 'Chromosome' an 'attach( Object )' and > 'getAttachment()' methods, much like Sun did with 'SelectionKey' in NIO? > > The reason I ask is that, when implementing the 'evaluate( Chromosome )' > method, one doesn't have a lot to go on with the 'raw' Chromosome object. > It'd be nice to be able to attach various identifiers and/or statistics to > a Chromosome. In my case, I would like to attach statistics on what that > Chromosome has been 'up to' and what 'score' it has reached (as I am doing > my ACTUAL evaluation prior to the 'evaluate' method). > > I have currently solved this by extending 'Chromosome', however this is > very awkward because you have to really know what you're doing with the > 'clone' method and compensating for 'randomInitialChromosome' (which > returns just a normal Chromosome). I ended up building a kind-of copy > constructor, which works but I think others would be much better off if: > > a) Chromosome was final > b) It had an attachment feature > > Many thanks, > > Richard. > > > > > ------------------------------------------------------- > This SF.net email is sponsored by:Crypto Challenge is now open! > Get cracking and register here for some mind boggling fun and > the chance of winning an Apple iPod: > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en > _______________________________________________ > jgap-users mailing list > jga...@li... > https://lists.sourceforge.net/lists/listinfo/jgap-users > |