title: Python CMA-ES Algorithm to solve user-defined function and constraints
body: <p>I am struggling to create a simple example of a <a href="https://www.lri.fr/~hansen/cmaesintro.html" rel="noreferrer">CMA-ES</a> optimization algorithm in python. What is the most streamlined way to optimize the function <code>x**2 + 2*y**2 -4*x*y - 0.5*y</code>, subject to constraints <code>-2&lt;x&lt;2</code> and <code>-1&lt;2*(x**2)*y&lt;1</code>, using the CMA-ES algorithm?</p>
  
  <p>I looked into the DEAP library, but was not able to develop a cohesive attempt. I found <a href="https://deap.readthedocs.io/en/master/examples/cmaes.html" rel="noreferrer">their documentation</a> less than intuitive. I also looked into the <a href="https://pypi.python.org/pypi/cma" rel="noreferrer">cma</a> package, but it is not clear to me how I can implement constraints.</p>