Discount Model Search ===================== Search eight decision variables using the first six as descriptors. :class:`qdpy.algorithms.DiscountModelSearch` learns a continuous discount over those descriptors with a CPU PyTorch model. The CMA emitter ranks candidates by improvement over the predicted discount. The result archive stores the best measured solution in each CVT cell. Install the :ref:`dms extra ` and run the script from the repository root. To use a CPU-only PyTorch wheel, install it first in the same environment. `PyTorch installation instructions `__ .. code-block:: sh python examples/discount_model_search.py python examples/discount_model_search.py --compare-cma-mae .. literalinclude:: ../examples/discount_model_search.py :language: python The example uses 32 fixed Sobol points as CVT centroids. Supply :class:`qdpy.containers.CVTGrid` one row per cell and one column per descriptor, in the raw units returned by the evaluator. Omit ``centroids`` to let the archive fit them. The comparison starts CMA-MAE with a fresh archive on the same centroids and gives each method 24 attempts. Read coverage and QD score on that shared geometry. The short budget is for inspecting the interface. See :doc:`specialized_qd_benchmarks` for results across five seeds. ``threshold_min`` is the target discount at the sampled initial centres. Use signed quality units, so ``-1.0`` corresponds to raw cost ``1.0`` for the default minimisation weight. Predictions can fall below this initial target. Keep signed quality within the model's float32 training range. Rescale an objective or its comparison weight if DMS reports an out-of-range target. DMS freezes its predictions while ranking a generation, then trains the model using measured descriptors and sampled empty centres. The example passes two nearby descriptor vectors to ``search.predict_discount(points)``. In the seeded run both land in cell zero, with predictions around ``-1.08`` and ``-1.02``. To inspect measured fitness, read the elites stored in ``search.container``. See `Tjanaka et al. (2026) `__ and the `authors' reference code `__.