# Constraint programming, safe exploration, and diffusion search The {download}`per-seed JSONL ` contains the solver check and both search comparisons. Search seeds run from 11 through 15. The solver runs once with one worker. ```bash python -m pip install ".[cpsat]" OPENBLAS_NUM_THREADS=1 python -I examples/certified_safe_diffusion.py all \ --include-cpsat --seeds 11 12 13 14 15 --output certified-safe-diffusion.jsonl ``` ## Job-shop certification Two jobs visit two machines in opposite order. Operations cannot overlap on a shared machine, and a cumulative resource limits simultaneous operations across machines. The archive describes makespan and the difference between job completion times. Minimize the sum of completion times in each of 35 cells. Exhaustive enumeration checked 4,032 start-time combinations. CP-SAT proved optimality in the same nine reachable cells, with matching raw objectives. It proved the other 26 cells infeasible. All 35 cells used a solver call. ## Safe exploration The simulator has two disconnected safe regions. Each arm starts with the same measured seed in the first region and has a ceiling of 32 evaluations. Safe Bayesian illumination uses a fixed panel of 161 candidates. The GP gate applies a three-standard-deviation lower confidence bound. The Lipschitz gate uses the simulator's known slope bound of one and makes no measurement-error allowance because the simulator is deterministic. Feasibility-weighted BOP-Elites uses the continuous decision interval and receives a binary feasibility label after every trial. | Dispatch policy | Attempts | Unsafe attempts | Safe cells retained | QD score | | --- | ---: | ---: | ---: | ---: | | Lipschitz gate | 32 | 0 | 7.0 | 2.993 | | GP gate | 1 | 0 | 1.0 | 0.080 | | Feasibility-weighted BOP-Elites | 32 | 16.0 | 11.8 | 6.917 | The two gated runs are deterministic. The Lipschitz gate stayed in the seed's safe region. The GP gate could establish no new safe point from a single seed at this panel spacing. BOP-Elites reached both safe regions and made 15 to 17 unsafe trials per run. ## Diffusion-based variation All arms evaluate 720 genomes per seed and report into the same 12 by 12 grid. Each of the four methods uses batches of 24. Both diffusion variants use 30 cosine stages. Himmelblau reports two normalized decision coordinates. The four-dimensional deceptive fixture has four narrow peaks and a broad lower maximum at the center. The grid reports the first two coordinates in that fixture. Peak discovery uses a radius of 0.1 on Himmelblau and 0.2 on the deceptive fixture, in normalized decision units. | Workload | Method | Filled cells | QD score | Peaks found out of 4 | | --- | --- | ---: | ---: | ---: | | Himmelblau | Diffusion MAP-Elites | 140.6 | 49.188 | 4.0 | | Himmelblau | Diffusion Evolution | 135.2 | 46.434 | 3.6 | | Himmelblau | Iso+LineDD | 139.8 | 50.115 | 4.0 | | Himmelblau | Differential MAP-Elites | 139.6 | 48.858 | 3.8 | | Deceptive peaks | Diffusion MAP-Elites | 139.2 | 45.046 | 0.2 | | Deceptive peaks | Diffusion Evolution | 140.0 | 45.950 | 0.2 | | Deceptive peaks | Iso+LineDD | 137.8 | 52.723 | 0.4 | | Deceptive peaks | Differential MAP-Elites | 140.4 | 47.710 | 0.4 | Archive guidance improved the diffusion baseline on Himmelblau. Iso+LineDD had the highest mean QD score on both fixtures. All methods filled most cells on the deceptive fixture and rarely found its narrow high-quality modes.