CMA-MAE with a best-only result grid ==================================== A CMA-MAE run maintains a search threshold for each cell and a result grid with the best genuine evaluation in each cell. The Rastrigin example prints both the threshold and the raw fitness values for the cell containing the best result. Install the :ref:`cma extra ` and run the script from the repository root. .. code-block:: shell python examples/cma_mae.py .. literalinclude:: ../examples/cma_mae.py :language: python :class:`qdpy.algorithms.CMAMAE` ranks a generation by improvement over each cell's threshold at the start of that generation. A qualifying group moves the threshold toward its mean quality, following Appendix H. The best qualifying member becomes the search representative for its cell. Use ``search.search_elites`` for those representatives and ``grid.solutions`` for the best results accumulated over the run. In the example run, the printed search representative has a higher raw cost than the best result in the same cell. Set ``threshold_min`` in signed, weighted quality units. The evaluator returns the raw Rastrigin cost between zero and one. A minimisation weight of ``-1`` converts cost ``0.4`` into quality ``-0.4``. At a threshold of ``-0.6``, that candidate gains ``0.2`` and can become a search representative. A lower cost already in that cell stays in the result grid. Increasing ``learning_rate`` makes thresholds respond more quickly to qualifying values. For your evaluator, set ``x0`` to a point within the decision bounds with at least two coordinates. Set ``sigma0`` in the units of that vector. A short final generation updates the archive and thresholds. Covariance adaptation requires a full generation. See :doc:`tutorial_dominated_novelty` for an example of manual batching. `Fontaine and Nikolaidis (2023) `__ ยท `pyribs CMA-MAE example `__