Dominated Novelty Search ======================== Use :class:`qdpy.algorithms.DominatedNoveltySearch` when you want a fixed number of survivors and have yet to decide how to bin descriptors. The example searches on normalised Rastrigin with two descriptors. It maps the final population to a 4 × 4 grid for reporting. Run from the repository root after installing the :ref:`base package `. .. code-block:: shell python examples/dominated_novelty.py .. literalinclude:: ../examples/dominated_novelty.py :language: python ``population_size`` caps the number of survivors. ``k`` caps the number of strictly fitter neighbours used to score each candidate. The score is the mean distance to those neighbours, or infinity when there are none. Equal scores keep incumbents before offspring in proposal order, and duplicate genomes share one entry. QDpy follows the paper's strict comparison. The authors' reference code includes equally fit neighbours. Report ``len(result.archive)`` as the survivor count and ``reporting_grid.filled_bins`` as coverage. Several survivors can share a cell. When comparing with MAP-Elites, use the same bins and descriptor ranges for both reports. For your evaluator, return consistently sized, finite descriptors. Rescale coordinates with unlike units before returning them because the competition score uses Euclidean distance. Manual generations ------------------ CMA-MAE, DNS, and MOME use ``batch_mode=True`` with the managed runner. To run a single generation yourself, keep the constructor and replace the call to ``run()`` and the reporting block with this code. .. code-block:: python candidates = search.ask_batch() search.tell_batch([illumination_rastrigin_normalised(ind) for ind in candidates]) print(search.nb_evaluations, len(search.container)) Pass results in proposal order and use ``None`` for a failed candidate. Use ``ask_batch(size)`` if fewer than a full generation's slots remain in your budget. For a managed DNS run, ``output_dir`` saves the run manifest. Use native logging to save the population itself. See :doc:`run_results`. `Bahlous-Boldi et al. (2025) `__ · `Authors' reference implementation `__