Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ algorithms return None on Windows #23

Open
NominHanggai opened this issue Apr 4, 2024 · 1 comment
Open

C++ algorithms return None on Windows #23

NominHanggai opened this issue Apr 4, 2024 · 1 comment

Comments

@NominHanggai
Copy link

NominHanggai commented Apr 4, 2024

Hi Dietmar,

I installed fast-cma-es on Windows 11 following the instructions in README (X64 C++ runtime libraries were also installed).
Tried a small optimization:

import numpy as np
from scipy.optimize import Bounds
from fcmaes import cmaescpp, cmaes


def obj(x):
    return np.sum(x**2)

bounds = Bounds([-1, -1], [1, 1])
result = cmaescpp.minimize(obj, bounds)
print(result)

and got the following result:

 success: False
  status: -1
     fun: 1.7976931348623157e+308
       x: None
     nit: 0
    nfev: 0

The python algorithm works (cmaes). Output:

 success: True
  status: 4
     fun: 3.7194596397089263e-19
       x: [ 5.707e-10 -2.152e-10]
     nit: 78
    nfev: 1209

What do you think could be the cause? Thanks :)

@andrea-tango
Copy link

Dear all,

I am also facing the same issue on Ubuntu!

The Python algorithm works (cmaes) while the cpp version returns None.
Can you please help me?

Thank you in advance.

Best,
Andrea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants