haifengl / smile

Statistical Machine Intelligence & Learning Engine
https://haifengl.github.io
Other
5.97k stars 1.13k forks source link

BitString crossover issue #732

Closed eugene-kamenev closed 1 year ago

eugene-kamenev commented 1 year ago

Describe the bug I think there might be a bug in implemented BitString crossover/mutation. If crossover rate is low, and same Chromosome is returned as an offspring and then mutated, my assumption is that fitness score should be resetted as well. Right now it is not resetted and returns wrong score (from previous generation).

Expected behavior If mutation happens and fitness score exists it should be resetted.

Actual behavior Same fitness score persists even if Chromosome got a mutation.

Code snippet

Input data The sample data

Additional context

eugene-kamenev commented 1 year ago

My apologize, have to investigate more. I will reopen with concrete example if find something.