Commit graph

1,851 commits

Author SHA1 Message Date
Meta Vens
dbcb2a8ea8 CultMath BoundedLeastSquares: release on the gradient against its rounding, never by the cost
A bound is released only when its violation exceeds both kktTol and the rounding
bound of its double gradient (Higham gamma_(n+1)); the cost-progress rule now judges
only passes that release nothing, and a release resets fMark. Fixes a cold start
stopping Converged with a violated bound (Soul W5, finding
aetheria-release:finding:cut-thrust-allocator-core.s1.solver-converged-early).
Tests: the W5 problem (cold == re-solve at 1e-12 and 1e-9) and the seed-141 noise
case. Builds; verified on Yggdrasil in the following report.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 08:51:18 +02:00
Meta Vens
50512e6e4f cultlib-gaps map: BLS early-stop diagnosis and CultMath rotation algebra
Imagination pass (session self-2026-10-10-ag): the cost-progress stop at
BoundedLeastSquares.cs:275 reports Converged with a bound still violated;
fix follows Lawson-Hanson. Quaternion algebra surface and the
mul(float4,float4) overload trap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 07:12:09 +02:00
Meta Vens
6bdc23c9fd Research: prior art on inverse procedural modelling from messy meshes
Eyes pass, 2026-10-10: inverse CSG and shape-program synthesis, primitive
fitting front ends, differentiable SDF/CSG fitting, measured LLM spatial
reasoning with a target, hard-surface detail, and the VibeGeometry record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 02:00:52 +02:00
Meta Vens
252e226c51 Merge hands/cultmath-release-0.4.0: org.gamecult.cultmath 0.4.0 cultmath-unity-v0.4.0
Cut cultmath-release (campaign cultlib-gaps). Soul passes 1-4; the last docs edit is the one pass 4 prescribed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 00:13:10 +02:00
Meta Vens
2855963ca1 CultMath docs: state the float32 tie band in ulps, as measured (Soul s4)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 00:12:23 +02:00
Meta Vens
299a4c5018 CultMath docs: magnitude-scaled float32 band; the frustum balls read no noise constant
Docs only; builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 00:04:07 +02:00
Meta Vens
104838ce10 CultMath tests: SnoiseTieScopeTests comment matches its set and the float32 band
Comment only; builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 00:04:07 +02:00
Meta Vens
5384d476ce CultMath smoke: fail unless Unity exited 0 and this run wrote the passing results
Stale logs are deleted before launch; the results file must be newer than the launch. All commits build (no source change).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 00:04:06 +02:00
Meta Vens
b88fdccb75 CultMath: commit the Unity import and dispatch smoke, with its broken control
packages/cultmath/scripts/unity-smoke/ holds the good compute shader, the
deliberately broken control, the EditMode test (FindKernel, dispatch, readback),
and run-unity-smoke.ps1, which builds a scratch project outside the repo with a
file: path to the package, takes the Unity path as a parameter, requires all
three tests to pass, and deletes the project. The package README's Unity section
names it as the pre-tag step. Not -nographics: GetComputeShaderMessageCount
reports 0 for a broken shader until FindKernel or Dispatch compiles it. Ran once
on Starfire with Unity 6000.3.24f1: 3 passed, control rejected. Builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 23:41:04 +02:00
Meta Vens
ab0eacd1c6 CultMath tests: SnoiseTieScopeTests pins each tie-rule site on its own
Asserts per output (value, and each snoise_grad component) that it differs
from 0.3.0 on the tie set, and pins the 0.4.0 values as goldens beside the
0.3.0 ones, so reverting either math.cs:614 or :720 alone fails the test. The
comment says inputs within a few float32 ulps of the set can tie too. Not yet
run when committed; the next commit-free verification run follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 23:37:24 +02:00
Meta Vens
d6a31416fd CultMath 0.4.0: name all three empirical constants; float32 ulp neighbours of the snoise tie set
CHANGELOG and package README: the noise enclosures rest on SNOISE_LIPSCHITZ,
SNOISE2_LIPSCHITZ and SNOISE_HESSIAN, all empirical with a margin; the README
bullet no longer says "with a proof" or "every point". Breaking: inputs within a
few float32 ulps of the tie set can also change (probe: none at 1e-5 or more,
a handful at 1e-6 near magnitude 30). Text only; builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 23:37:24 +02:00
Meta Vens
f9118e1a66 CultMath 0.4.0: the noise-ball enclosures are empirical, not proven
CHANGELOG and README no longer claim iv_snoise_ball and iv_fbm_ball enclose
every input unconditionally: they rest on SNOISE_LIPSCHITZ, an empirical bound
with a margin, and the tests sample. Docs only; builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 23:07:48 +02:00
Meta Vens
7bd34a96ce CultMath 0.4.0: state the true scope of the snoise tie change
The Breaking entry now names the whole tie set (inputs whose y-x and z-x are
whole numbers, every integer point included, change by up to 0.776), with
examples and a consumer warning; design.md and the NoiseGradTests comment drop
the narrower origin-and-(t,t,t) wording. Docs and test comment only; builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 23:07:48 +02:00
Meta Vens
96ffb97bbe CultMath tests: pin the snoise tie-rule scope against the 0.3.0 DLL's values
Inputs whose coordinate differences y-x and z-x are whole numbers move from the
0.3.0 value; inputs off that set keep its bits. The goldens were computed by
the cultmath-unity-v0.3.0 tag's tracked CultMath.dll. Builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 23:07:42 +02:00
Meta Vens
476a5fa491 CultMath: tracked DLL and pdb rebuilt at 0.4.0 on Windows
Copied from artifacts/cultmath-unity-build of the release script's first run
(netstandard2.1, non-incremental, Source Link off, ContinuousIntegrationBuild).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 22:07:05 +02:00
Meta Vens
84c4bb14e3 CultMath 0.4.0: version, changelog, NuGet packs CultMath.Affine.hlsl
Bumps CultMath.csproj, the Unity package.json, the org.gamecult.cultlib
dependency and the semver-policy paragraph to 0.4.0. CHANGELOG states the snoise
tie rule under Breaking and the additions since 0.3.0. The tracked DLL and pdb
still read 0.3.0 at this commit, so the release script's parity check fails here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 22:03:43 +02:00
Meta Vens
e1b2f513f9 Merge hands/cultmath-bls-kkt-tolerance: BoundedLeastSquares takes a relative KKT tolerance
Cut bls-kkt-tolerance (campaign cultlib-gaps). Soul pass 2 holds at 9df0a82f.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 22:02:04 +02:00
Meta Vens
9df0a82faf CultMath tests: pin the KKT tolerance threshold, both decision sites and the forwarded default
The release flips at 1.05x and 0.95x of the computed relative gradient at four
weights either side of 1e-6; all-free conditioned solves change between the
default and 1e-12; the omitted tolerance releases at 1.1e-6 and not at 0.9e-6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 20:12:08 +02:00
Meta Vens
885b90c355 CultMath: BoundedLeastSquares crefs no longer name the overloaded Solve
Both crefs were ambiguous (CS0419) once Solve had two overloads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 20:12:08 +02:00
Meta Vens
3dce41bd57 CultMath tests: the KKT tolerance argument of BoundedLeastSquares
Default and explicit-default are bit-identical; a light term under a heavy row
and an allocator-shaped problem are start-dependent at the default and solved
tight at 1e-12; invalid tolerances leave x untouched; the noise-floor fixtures
stop on progress at 1e-12 and 1e-30 (at most 6 iterations); the tolerance path
allocates nothing; the original ten-parameter signature still exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 17:21:10 +02:00
Meta Vens
e0ca817e82 CultMath: BoundedLeastSquares.Solve takes an optional relative KKT tolerance
New overload with kktRelativeTolerance before maxIterations; the existing
signature forwards with the new public DefaultKktRelativeTolerance (1e-6), which
replaces the private constant. A tolerance that is not finite and positive is
InvalidInput with x untouched. The default path is bit-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 17:21:10 +02:00
Meta Vens
2ad30fbfcf CultMath tests: pin default BoundedLeastSquares solves to their golden bits
Records status, iteration count and every float bit of x for the A54/B5 fixture,
three seeded random problems and a Duel allocator problem, taken at f7ab6212.
The kktRelativeTolerance cut must keep these literals unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 17:13:33 +02:00
Meta Vens
f7ab62126e Target: cultlib-gaps, the standing home for capabilities consumers find missing
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:40:01 +02:00
Meta Vens
05e6701451 Map headers: affine forms and the tie fix are built; the tape target's remaining steps stay parked
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 13:00:00 +02:00
Meta Vens
d4e3b837f3 Merge modeling/affine-as-built: the as-built map of the snoise tie fix and affine forms
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 12:59:59 +02:00
Meta Vens
4b34b12b21 Map: as-built section for the affine forms and snoise tie cuts
Owners, mirror chain, derived state, verification venue, release state,
stale docs found.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 12:59:30 +02:00
Meta Vens
14568bf9b0 Merge imagination/affine-forms-map: Passes 5, 5b and 6 of the interval ground map (affine forms, deep well, snoise tie)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 12:57:26 +02:00
Meta Vens
156782da0e Merge hands/cultmath-affine-forms: affine forms for noise bounds, in C#, HLSL and GLSL
Reduced affine arithmetic (centre, one shared symbol, one error term) for CultMath:
af_* ops, af_snoise / af_fbm with gradient-plus-curvature forms, af_frustum_*, the
2D iv_snoise_ball, and the centred warp bound. Mirrored bit for bit in
CultMath.Affine.hlsl (and the Unity copy), lowered into CultMath.glsl, with fixture
families that check enclosure on device, including small-reach and C#-centre legs.
Scenario (c) is a deep well an order of magnitude past the fog band; affine beats the
centred interval there (3.57x / 3.46x vs 3.20x / 3.12x), asserted, not skipped.
Soul held cut-affine-forms (s1-s3) and cut-affine-shaders (s1-s3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 12:57:11 +02:00
Meta Vens
81b7cf10e3 design.md: (c) and (c-band) rows and the closing paragraph back to the gate with its detail ball [affine-gate-loses-fog-culls]
Re-measured at c01ff025 with IntervalSkipHalvesEvaluations: (c) affine 3.57x and 3.46x, c-band 3.95x
and 3.54x, efficiencies and range-ceiling ratios as printed; the (b) rows and the DeepWellCullMap
figures (4.23, 3.60, 2.02) are unchanged. The sentence that justified deleting the affine detail
ball is gone with the deletion.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 12:23:02 +02:00
Meta Vens
c01ff025bb Gate test: restore the affine gate's detail ball and add FogField.InsideFog to the field list [affine-gate-loses-fog-culls] [interval-gate-detail-unpinned]
Deleting the affine gate's detail ball (51a4034c) gave up 6 of 5933 provable culls inside the fog
(first: (b) inside the fog [affine]); the gate never gives up a provable cull, and a 1.4% probe
saving does not buy breaking that. The detail ball is back in the affine gate, and the gate test
now includes the fog interior, the only field where the interval gate's detail ball decides, so
saturating either gate's detail ball fails the test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 12:12:36 +02:00
Meta Vens
8dced0bf91 design.md: the deep-well cull-map run re-measured (DeepWellCullMap, explicit)
Cells per ray 4.23 interval, 3.60 affine, 2.02 oracle, the most 44, mean transmittance 0.278,
measured at the affine gate fix; the interval figure (4.51, 45) was already stale: the interval
path is unchanged by that fix.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 11:14:18 +02:00
Meta Vens
c28cb4488b GLSL fixture: small-reach af_snoise and af_fbm families, and the centre leg of the device check [device-check-blind-to-allowance] [device-check-self-referenced]
Two families are appended (256 cases each, reach |axis| + radius of 1e-6 to 1e-3, the centre in
[-50, 50] or [-1, 1]); the earlier families are byte-identical. In the main families the
second-order remainder is at least 0.057 of e even without the allowance; here the float32
allowance is most of e, so a device whose gradient error exceeds it fails the enclosure check.
Their check text adds the centre leg for every af_snoise and af_fbm family: the fixture's own
x0 (C#'s value at the centre) must lie in the device form's [x0 - e, x0 + e], so a device whose
noise is wrong everywhere no longer passes against its own reference.

AssertSampledForm counts the cases that need the allowance (32 of 256 af_snoise, 3 of 256
af_fbm on C#'s own results) and the small families fail unless there is at least one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 11:09:35 +02:00
Meta Vens
b6d50be653 Mirror sweep reaches af_snoise's centred branch: realistic slices, both sides of the choice [mirror-sweep-misses-centred-branch]
EveryMirrorFunctionMatchesCSharpMath draws centre, axis and radius from [-100, 100], far past the
0.15 or so below which the centred form wins, so an HLSL edit of the choice survived it.
AffineSnoiseMirrorMatchesCSharpBitForBitOnBothSidesOfItsBranch draws 20000 slices (axis and
radius log-uniform 1e-3 to 0.5), asserts both branches are met more than 2000 times each, and
compares af_snoise (and af_fbm every eighth) bit for bit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 11:09:34 +02:00
Meta Vens
799029bebe af_range finds a NaN endpoint by its bit pattern, which dxc's fast-math compare cannot fold [af-range-nan-guard-folded-by-dxc]
dxc marks compares fast, so `lo == lo ? lo : -inf` was deleted under default flags and an
overflowed form ranged to NaN on HLSL targets. The guard now tests (asuint(lo) & 0x7fffffff)
> 0x7f800000, in HLSL, the Unity copy, math.Affine.cs and the regenerated CultMath.glsl.
dxc 1.9.0.5402 -T ps_6_0 default flags: before, no fcmp/select/and in the af_range body;
after, and/icmp ugt/select to +-inf for both endpoints (also under -Gis).
AffineRangeMirrorMatchesCSharpBitForBitAtTheFloatExtremes pins the mirror at zero to the
float maximum, infinities and NaN components.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 11:09:25 +02:00
Meta Vens
51a4034c66 Affine gate: delete the detail term (saturated at [-0.5, 0.5]); design.md (c) rows re-measured [gate-detail-term-dead]
The affine gate's best-case detail ball decided no probe on the gate test's slices and one
of the deep well's 8074 oracle-empty cells (11 of 11096 in c-band); skipping it saves the
probes: (c) affine 3.57x -> 3.62x and 3.46x -> 3.54x, c-band 3.95x -> 3.96x and 3.54x -> 3.60x.

The interval gate keeps its detail ball. Saturating it there (measured, then reverted)
takes row (b), inside the fog, from a cull fraction of 0.663 to 0.585 and a cost ratio
of 1.16x to 0.98x, so the term is live; the finding's premise holds for the affine gate only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 11:08:50 +02:00
Meta Vens
2a1f9df19a GLSL fixture: the af_* families and iv_snoise_ball(vec2), with enclosure checks for af_snoise, af_fbm and af_frustum_ball
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 09:47:49 +02:00
Meta Vens
e16edc0b70 Affine forms in HLSL: CultMath.Affine.hlsl mirrors math.Affine.cs bit for bit; iv_snoise_ball(float2); the GLSL lowering carries them
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 09:47:49 +02:00
Meta Vens
962aa45d47 design.md: rows (b), (d), (e) and the closing paragraph re-measured on the snoise tie fix (one tree)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 09:33:28 +02:00
Meta Vens
03359a2365 NoiseBoundTests: the gate never gives up a cull the ungated bound proves (pins the loosening direction)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 09:24:27 +02:00
Meta Vens
118e85fd3a design.md: the slice returns the final af_snoise arguments; the composition test
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 07:37:35 +02:00
Meta Vens
aad21e4b36 design.md: the (c) rows re-measured on the snoise tie fix (the centred interval 3.20x and 3.12x, affine unchanged)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 07:37:25 +02:00
Meta Vens
25e0aa3fe4 NoiseBoundTests: the slice's reach is |axis| + radius
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 07:34:22 +02:00
Meta Vens
bdafdf3dd1 NoiseBoundTests: the affine composition must win in 35% of open slices and narrow the interval piece
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 07:28:03 +02:00
Meta Vens
52bf488b51 NoiseBoundTests: the affine piece alone is wider in total; measure the intersection's gain
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 07:26:34 +02:00
Meta Vens
922e4da458 NoiseBoundTests: FogField.Slice returns the final af_snoise arguments; AffineBound has no term left to wire
Slice builds each phase's coverage argument and the detail argument (centre,
axis, radius in noise space); AffineBound and its gate read them whole.
AffineWarpStaysEnclosed checks the rays against those arguments and their
derivation from CentredWarp; AffineCompositionIsTighterThanItsRanges sees the
shared-eps composition and the intersection.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 07:20:56 +02:00
Meta Vens
d8eaa110c9 AffineTests: af_range encloses on every overflowed form, the infinity on the NaN side
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 07:20:56 +02:00
Meta Vens
8195ac1286 iv_snoise_ball(float2): the doc states it is exact for its point and names the caller's float32 allowance
The 2D ball carries no evaluation allowance, like iv_snoise_ball(float3); the
caller that rounds the flow's point adds 2^-14 + L2 2^-20 (|centre|_1 + radius),
the convention af_snoise carries for the 3D point.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 07:20:55 +02:00
Meta Vens
05150acd2f Merge remote-tracking branch 'origin/main' into hands/cultmath-affine-forms 2026-10-04 07:17:20 +02:00
Meta Vens
48aadda0b9 Merge hands/cultmath-snoise-tie: snoise breaks simplex ties in a total order
Upstream Ashima's step compares are cyclic, so where x0's components compare equal
(the origin, every (t,t,t), all lattice diagonals) the corners stop being a simplex
and snoise jumps (about 0.77 near the origin, up to 1.56 further out). The z-x compare
is now strict, giving Gustavson's simplexnoise1234 order in C#, both HLSL copies and
the generated GLSL. Off the z=x tie set values are bit-identical. SNOISE_LIPSCHITZ
re-pinned 10.099261 -> 7.9640074. A value change: next cultmath-unity release is
Breaking (follow-up snoise-tie-release). Soul s1 held (cut-snoise-tie.h2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 04:26:19 +02:00
Meta Vens
e1daefb5b6 snoise tie docs: the old rule's jump reaches 1.56 away from the origin, not 0.77
Soul s1 (cut-snoise-tie) measured 1.55 to 1.56 at magnitudes 64 and above;
0.77 holds only near the origin. Comment and design text only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 04:25:58 +02:00