Closed lmrobins closed 7 years ago
Hi @lmrobins
Thanks a lot for opening the issue! I haven't updated the .Genetics namespace since the merge with AForge.NET, so thanks a lot for the catch. If you see other problems, including inconsistent interfaces, or just things that do not work as you would have expected in the first try (even if they are not really bugs, just nuisances in the current API), please let me know.
Also, if you are still getting those authorization errors you mention, please let me know too - are they errors with git/GitHub, or errors within the project itself? Please feel free to open a new issue if you haven't been able to solve them yet.
Regards, Cesar
Hi Cesar, I know of at least one other issue with DoubleArrayChromosome but the fix isn't as straight forward, but I would be happy to submit a pull request for it when I get the git issue fixed. I have a feeling it's my own git setup conflicting with another non-github repository I use.
I got it worked out and was able to submit the request. I wasn't sure if it should be against development or master? I went with a single file change against the Master, but then the CI failed with an unrelated error.
Hi @lmrobins,
If you can, please submit against development. Do whatever is easier for you, and then I can take care of the merging (even if this means attaching a .zip file with your changes to this thread).
Thanks a lot for the willingness to share your fixes!
Regards, Cesar
Ok thanks @cesarsouza, I created a new pull request against development.
Added in v3.7.0.
In DoubleArrayChromosome.cs, the CreateNew function is used when initializing a genetic algorithm Population object, or when performing selection on an existing Population. The CreateNew function just creates a new instance of a DoubleArrayChromosome using the founding chromosome generator settings. Unfortunately it ignores the founding chromosome's CrossoverBalancer and MutationBalancer settings, so the entire population (and newly selected members of the population) will have the wrong Crossover and Mutation balancer settings.
The fix is easy (just update the CreateNew function), but I'm new to this project and keep getting an authorization error when trying to create a new branch for the change, so I thought I'd post about it here instead.
The CreateNew function should look like: