Skip to content

v0.2.2 — NaN and constraint hardening, TypeSafe host pin

Latest

Choose a tag to compare

@jkbennitt jkbennitt released this 29 Nov 06:40
d092078

Patch cut of merged #16, #17, and #19 plus the Unreleased TypeSafe / Jev notes (#20). Merge commit d0920784. Reviewed head bc5eb0f1.

GitHub Packages only (no nuget.org). PackageId Unsga3 0.2.2. Tag v0.2.2 matches Directory.Build.props <Version>0.2.2</Version>, so publish-github-packages can run. Published 15-seed IGD and Wilcoxon numbers are unchanged.

Full notes: CHANGELOG

[0.2.2] — 2026-11-29

NaN and constraint hardening, selection niche-count fixes, and an optional TypeSafe pass whose API key stays on api.typesafe.ai. Defaults stay unconstrained RankNicheDistance, independent mating, and single-layer DasDennis. GitHub Packages is still the only publish target. No new IGD or Wilcoxon table.

Added

  • Optional TypeSafe / Jev System One pass (tools/typesafe-pareto) for Score + Choice judgments over a small Pareto candidate sample. Additive semantic layer — does not replace NSGA-III / U-NSGA-III objectives. Live calls only when TYPESAFE_API_KEY is set; CI uses mocks. Metrics append to metrics/typesafe-runs.jsonl.
  • TypeSafe API key host pin (#16, #17). Live calls accept only api.typesafe.ai. Other base URLs are rejected. The scheme must be HTTPS, the port must be omitted or 443, and a trailing-dot host is rejected. Redirects that leave that allowlist are refused, so Authorization is not forwarded. The SDK client is constructed with httpx2.Client(follow_redirects=False).
  • OptimizationResult.FeasibleNonDominatedSolutions: the strictly feasible non-dominated set, empty when the final population has no feasible member. Individual.Evaluated is public.
  • tests/Unsga3.Tests/Unit/OperatorAndHardeningTests.cs with 16 [Fact] methods.

Changed

  • Docs and XML comments describe initialPopulation and hybrid loops in generic terms (domain-adapter warm-start / grid-seed). No product-repo names.
  • NonDominatedSort compares pairs in an upper-triangular loop. SortReadOnly returns fronts without writing Individual.Rank. OptimizationResult uses it, so constructing a result does not mutate ranks in FinalPopulation.
  • Splitting-front survival pre-buckets candidates by reference index. ReferencePointManager.Associate compares squared perpendicular distance.
  • CI builds with -p:TreatWarningsAsErrors=true and smokes samples/BasicUsage. The publish workflow's test step passes the same warning flag, and it rejects a v* tag whose version is not Directory.Build.props <Version>. The package includes .snupkg symbols.
  • Oracle scripts: analyze_dtlz2_gap.py reads the current {tournament}_{mating}_F.csv names, compare_results.py prints n/a when IGD is null, and run_multiseed_wilcoxon.py prefers full-precision IGD from _meta.json.
  • Removed tests/Unsga3.Tests/Equivalence/EquivalencePlaceholderTests.cs.

Fixed

  • NaN objective coordinates are ordered strictly worse than finite and ±Inf values in Pareto comparison.
  • RefreshConstraintViolation maps a NaN constraint to +Inf violation. EvaluateAll always refreshes constraint violation and sets Evaluated.
  • SBX and polynomial mutation reject non-finite probabilities and distribution indices. Probability ≤ 0 returns before the RNG draw, so a zero probability cannot fire when NextDouble() is 0.
  • On a mixed feasible/infeasible pool, PrepareForSelection counts niches from feasible members only and leaves constraint-violation fillers unassociated. All-NaN objectives stay unassociated (-1, perpendicular distance +Inf).
  • ZDT requires nVariables ≥ 2, Sphere and Ackley require nVariables ≥ 1, and Rosenbrock requires nVariables ≥ 2, checked before bounds allocation. DTLZ and C1-DTLZ1 check nObjectives ≥ 2 and k ≥ 1 before bounds allocation; DTLZ4 also rejects a non-finite or non-positive alpha. ReferenceDirections.Count and PartitionsForMinimumDirections reject non-positive inputs, and the partition search no longer stops at a silent p < 100 cap. RandomProvider.NextDouble(min, max) requires finite bounds and uses an overflow-safe interpolation when the span is infinite. NextExcept rejects n ≤ 0 and draws normally when exclude is out of range. Hypervolume2D rejects a null objective vector and any vector whose length is not 2.