pymoo icon indicating copy to clipboard operation
pymoo copied to clipboard

Bug: Random seed incorrectly set for CMAES optimizer

Open CodingTragic opened this issue 1 year ago • 1 comments

If the following is called, the seed is ignored.

algorithm = CMAES(popsize, ...)
algorithm.setup(problem, seed, termination)

The above setup method is located in base class Algorithm, which calls the _setup method of child class CMAES without providing the seed parameter, which is used to set a value of member "options"

Further, the setup method of base class Algorithm assigns an instance variable to the seed and thus providing the seed as a parameter is redundant - it can use the derived member "seed".

CodingTragic avatar May 31 '24 06:05 CodingTragic

Thanks for creating this issue.

Can you please check if the commit above fixed the problem?

blankjul avatar Jun 02 '24 19:06 blankjul