GMUEClab / ecj

ECJ Evolutionary Computation Toolkit
http://cs.gmu.edu/~eclab/projects/ecj/
123 stars 42 forks source link

FloatVectorSpecies Mutation Parameters Silently Ignored in Segments #48

Closed SigmaX closed 3 years ago

SigmaX commented 6 years ago

This is an issue that has tripped me up more than once over several years of using ECJ: with the exception of mutation-prob, the parameters of mutation operators for FloatVectorSpecies are silently ignore if no mutation-type is explicitly specified for the segment.

pop.subpop.0.species.segment.0.start = 0                                                                                                                                          
pop.subpop.0.species.segment.0.mutation-type = gauss                                                                                                                              
pop.subpop.0.species.segment.0.mutation-prob = 0.5                                                                                                                                
# This mutation-stdev is read correctly, because mutation-type is specified                                                                                                            
pop.subpop.0.species.segment.0.mutation-stdev = 0.1                                                                                                                               

pop.subpop.0.species.segment.1.start = 2                                                                                                                                          
pop.subpop.0.species.segment.1.mutation-prob = 0.067                                                                                                                              
# This mutation-stdev is silently ignored, because mutation-type is not specified                                                                                                      
pop.subpop.0.species.segment.1.mutation-stdev = -0.001    

The mutation type is typically inherited from the global setting, so there is a strong temptation to omit it.

I once tried to fix this by re-writing ECJ's segments mechanism from scratch in a cleaner way, such that global settings were seamlessly inherited for all parameters. It might be worth attempting that again.

SigmaX commented 3 years ago

This seems to only bother me, and "rewriting ECJ's segments mechanism" is non-trivial. Closing.