Closed gaetanserre closed 3 months ago
Hi @gaetanserre this may not be the technical answer you may need, but first minimax with CMA-ES appears to come with its own technical and theoretical requirements, see https://dl.acm.org/doi/10.1145/3512290.3528702 for a recent GECCO-22 publication (I haven´t read it yet).
Now, regarding the debugging of your code, going with the Python wrapper makes it difficult [1]. You may want to try the Python CMA-ES version, that will give you more freedom for experimenting slightly outside the box use-cases.
[1] Reason is there's a low-level C++ binding through boost-python that happens once, so when using two instances of lcmaes on top of it, more or less all underlying C++ objects get shared, and thus trouble is certain to arise. Also this looks plausible regarding your error.
Thank you very much for your answer and for the reference. Indeed, it works with the Python implementation of CMA-ES, but it is slow comparing to yours. I guess I will implement a simple optimizer in pure Python for the max
of the min-max
problem.
Another way could be to work it out directly from C++. I can't guarantee there would not be issues with shared objects out of the box though.
Indeed it's more likely to work in pure C++. However, I have to stick with Python for my problem. I'll use the Python implementation, I was wrong, it is not that slow.
Is there a way to deal with
min max
problems using the Python bindings oflibcmaes
, i.e.: minimize a function usinglcmaes
f
that itself maximizes an other functiong
usinglcmaes
? When I try a naive way, I got anboost::python::error_already_set
error.Output: