commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben McCann (JIRA)" <j...@apache.org>
Subject [jira] Commented: (MATH-207) Implementation of GeneticAlgorithm.nextGeneration() is wrong
Date Fri, 27 Feb 2009 02:08:02 GMT

    [ https://issues.apache.org/jira/browse/MATH-207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677207#action_12677207
] 

Ben McCann commented on MATH-207:
---------------------------------

I think that making nextGeneration public would be reasonable.
A few other thoughts about the API:
All the setters should be changed to constructor arguments.  If you do not call each of the
setters then you are in an illegal state.  You avoid the problem of having some call evolve
before the mutation policy and crossover policy are set if you just make them required in
the constructor.
For crossOverRate and mutationRate we should specify that the input is expected to be between
0 and 1 and throw an exception when given invalid input.  It's currently not clear in the
javadocs what is expected.

> Implementation of GeneticAlgorithm.nextGeneration() is wrong
> ------------------------------------------------------------
>
>                 Key: MATH-207
>                 URL: https://issues.apache.org/jira/browse/MATH-207
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: David Stefka
>            Assignee: Phil Steitz
>             Fix For: 2.0
>
>         Attachments: genetics_impl.zip, patch
>
>   Original Estimate: 0.17h
>  Remaining Estimate: 0.17h
>
> The implementation of GeneticAlgorithm.nextGeneration() is wrong, since the only way
how a Chromosome can get into the new generation is by mutation. 
> Enclosed, I am sending a patch for this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message