thieu1995/opfunu

[BUG]: Function 14 from CEC2014

mrsonandrade opened this issue · 2 comments

Description of the bug

Hi! I was using function 14 (F14: Shifted and Rotated HGBat Function) from CEC2014 and found that evaluating the x_global gives a different result from what is expected. So, this gives a False output when we use problem.is_succeed(problem.x_global).

The expected value of problem.evaluate(problem.x_global) is 1400 (based on the document from CEC2014), but it is giving 1400.5, which explains the abovementioned issue.

Steps To Reproduce

import opfunu

problem = opfunu.cec_based.F142014(ndim=10)
problem.evaluate(problem.x_global) # expected to be 1400.0
problem.is_succeed(problem.x_global) # expected to be True

Additional Information

No response

Hi @mrsonandrade,

Indeed, some functions from CEC functions, they don't have exactly global optimum, it is just near global optimum. Even in the original PDF paper, they still have some bugs and writing issues. So I think you shouldn't use is_succeed() function. Because you know the global optimum value, for example that function is 1400. So you can compare with the results of other models. Which model give nearest to 1400, that model is the best.

Oh! Great! Thank you for the explanation @thieu1995 😃