ABI 13. support_body (the highest body lane touched) and support_particle (the
first listed solid that touches) are cleared to -1 for each live fluid lane
after prediction and written by body_contacts and the fluid-solid contact pass;
create and destroy write -1. Resting on fluid alone reads -1 on both. The step
writes them and no pass reads them: the pins (Abi8, Pile, Fluid) do not move.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Fluid_cost_line ran the scene without fluid once and each viscosity once, so its
increment moved 0.3 ms run to run. Each (n, viscosity) now runs nine interleaved
pairs (the order alternating) and prints the median increment and its
interquartile range. Printed, not asserted. No behaviour change.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Column mean bound 0.0907 (ruling ymir-column-mean-bound-order-noise): Md claims it; Mk is claimed by KERNEL_REACH (table of 512 buckets so a shared
bucket cannot hide the miss), Mf by floor penetration and through count, Mo by the overflow asserts; Mx and Mu unclaimed. Fluid_cost_line prints
bytes per lane. docs/soa-world.md: two sorts with fluid live, kernel cell, CSR lists under the fluid capacity, fluid-solid contact, cost readings.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ymir_particle_capacities and Box3DSoaParticleCapacities gain fluid (last, 0 default); the lists are CSR rows (nbr_start, nbr_count) in an arena of
fluid * 96 entries, 0 bytes without fluid; a batch of fluid past the capacity returns FULL before a lane is taken. No-fluid worlds carve 28 bytes
a lane instead of 388. Hashes unmoved.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
build_grid sorts the non-fluid lanes at 2 rmax; fluid_density rebuilds the tables over every live lane at 4 rfmax, copies position, inverse mass and
phase in sorted order, and walks each fluid row's deduplicated buckets with a branchless distance filter into a row buffer (128). Fluid-solid contact
is a count-and-move pass over the lists after pass B. FluidHashes re-pinned once here: sorted rows and kernel-cell bucket order and the moved contact
change every pair sum. ColumnMean re-derived over twelve bucket orders by lodur:ruling:ymir-column-mean-bound-order-noise (worst 0.0178, Md 0.4625, bound 0.0907).
Abi8Hashes and PileHashes unmoved.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
512 fluid still +3.0 to +3.4 ms against the 1.0 target; per-phase readings in the docs; per-tick lists and cell-sorted copies stay parked.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Mr (rings forced 1) claims KERNEL_REACH (0 vs 2.53e-3) and the floor (0.258); Md (fluid pairs from both rows) claims column mean (0.467 vs 0.0133), floor and the column max; Mo (capacity 8) overflows 597364 / 25823 / 28049 against 0. Existing bounds keep their values (midpoints would rise).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The flat offset loop paid three integer divisions per cell (125 cells at equal radii): pass A read 4.9 ms a tick at 512, 2.9 with the loops. Order and hashes unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
build_grid's cell is 2 rmax always; fluid_rings = ceil(2 (rfmax + rmax) / 2 rmax) derives the kernel reach over it. Pass A walks
(2R+1)^3 cells and writes each fluid row's list (96 slots, overflow counted in fluid_overflow); pass B and XSPH read only the lists;
walk_half serves contacts only. Spec order (1) rings, (2) lists is one commit: rings without lists leave pass B blind to 4 r pairs.
FluidHashes re-pinned (pair order and accumulation change); Abi8Hashes and PileHashes unmoved.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Particle_source_rules: create_particles names TOPO_ISOLATED and not TOPO_FULL, destroy_particles names both (M6a, create
runs FULL, now fails without timing); the substep gate regex follows the viscous-material gate. A lone solid particle with
a tether attachment makes no tether lane (0 before, 0 attached, 0 after destroy): destroy_particles' attachment term in
`held` is dead and goes, with 'or attachment' in its comment; the test pins the absence. Column max keeps 1.5 and is
recorded as claiming no mutant (Mc1 lambda halved 1.2116, Mc2 no self term 1.3340 against shipped 1.3440). docs/soa-world.md
Fluid bullet: inverse-mass lambda, XSPH skip, the held-floor claim; Not done: the sheet sieve at 4 substeps.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Deletes PourSub = 10 and the pour's four count assertions (sheet >= 250, rope >= 30, below >= 300, deep == 0): they
claimed no mutant (finding pour-bounds-knife-edge). The pour now runs at Sub, prints the fluid reading, the same block
flagged solid as the control and the worst sheet edge stretch, and asserts nothing; the sheet sieves at 4 substeps
(question ymir-sheet-sieve-at-budget-substeps). The no-tunnelling claim moves to Fluid_holds_on_a_solid_floor
(penetration <= 0.233 claims Mt1 and Mt2, through <= 18 claims Mt1; finding pour-tunnels-below-10-substeps).
FluidHashes re-pinned at 4 substeps (formula and order changed); Release equals Debug. Abi8Hashes and PileHashes
are not touched.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ymir_particles_substep gates fluid_viscosity on live_fluid > 0 and a viscous material (one scan of the material lanes a
substep); walk_half takes a required row phase bit and viscosity_pair's walk passes FLUID, so no solid row is walked.
The per-pair c == 0 early-out stays for mixed materials. Addresses finding fluid-cost-5x-target (Soul's probe: skipping
XSPH 4.7 -> 3.7 ms at 512). Shear ratio unchanged 0.7799; M5 and Mv read 1.0000. FluidHashes move with this and are
re-pinned in commit 3.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fluid_density pass A weights the denominator by inverse mass (w_i |sum grad|^2 + sum w_j |grad_j|^2, eps w_i; 0 when
the denominator is 0), pass B moves each end w * corr instead of 2 w/(wi+wj) * corr. Equal masses unchanged, a static
end takes nothing. Energy rise at 30:1 1.108 -> 1.000000 (M9 = the old split). Fixes findings energy-rise-narrowed.
MomentumBound 2.0e-3 and EnergyBound 1e-5 are kept (a re-derived midpoint would loosen both).
Fluid_world_is_byte_deterministic (FluidHashes) and the pour's counts change with the formula and are settled in
commit 3; Abi8Hashes and PileHashes are untouched.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Poly6/Spiky kernels per pair h = 2 (ri + rj), n0 a create-time lattice constant, lambda gathered over the 27 cells, corrections scattered over the contact pass's half-walk (the walk is now shared) and split by inverse mass, XSPH after the velocity update. Grid cell 2 r_max with no live fluid (byte-identical), 2 (r_fmax + r_max) with. Binding: Box3DSoaPhase.Fluid, material viscosity, ParticleDensity and MaterialViscosity lanes, ABI 11 (the lanes are here because the fluid tests read them).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
rederive_topology takes a mode: ISOLATED writes the component lane of the lanes a command made or unmade and returns, FULL is the derivation. create_particles always isolates (a new particle holds no constraint); destroy_particles isolates unless a named particle held a live distance or attachment.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The suite passed with the parent gate removed; the gate fires only in intermediate derivations of the 20-pin build (37 gated
particles over the 20 attaches, none at the end), so the invariant is checked after each attach.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
h2's loosened bounds are reverted. Momentum stays at 5e-4 with the measured float32 reason. The corner-group sheet is read at 8 s
(it still rings at 5 s: 1.10% under at 5 s, within 0.2% from 6 s). Docs describe islands, the parent gate, geodesic bounds, the
pair rule and counts, and drop the nearest-only text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the multi-source one-tether-per-particle derivation. A tether island is a maximal set of tether particles joined by
live distances; each non-tether particle is held to the nearest point of its two nearest islands by rest path, written per
island in lane order behind a parent gate (float ties at rank 2). A pair tether is derived only when a body is among its two
attachments (end_w is 0 at a static end). Tests: two-island derivation (rope, star, 9-rope) and the two-corner-group sheet
(read at 8 s: the sheet rings at 5 s). Pile hashes re-pinned: the pile's tether set changes with the rule; two runs agree.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pair contact finds each pair once (own cell plus 13 forward cells) instead of from both ends: 1.91 -> 1.46 ms on 16 ropes x 48 (native, 4 substeps). Tethers: a multi-source Dijkstra gives each particle one tether to its nearest TETHER attachment (Kim 2012); a pair of tether points keeps its pair tether behind a route of booking lanes. The skip_body lane is gone: held_by scans the attachments on contact. Pile hashes re-pinned (tether lanes and contact sum order changed).
The chain lanes, chain commands and exports, PARTICLE_PARTICLE attachments, chain-order implicit constraints,
the per-particle contact average and the chain-order tension sweep are gone in the same commit as the graph
that replaces them: the module, its exports, its binding and its tests do not build apart.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Rewrite the particle section for r2: why a post-step correction fails, the substep order, the
sensor definitions, the new tests; drop the split-impulse paragraph and the Not-done lines on
tension, cancel/restore and two-attachment direction; the box3d pin is the substep-callback
commit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Chain_holds_a_70kg_body is tightened (speed, stretch and impulse per tick over 1 s to 5 s);
Top_link_tension_reads_the_load runs at 1, 5, 20 and 70 kg; new tests pin momentum and apex
of a throw, the snap, the pendulum and spin, release in the step, the impulse lane equal to
what Box3D applied, friction on a slope, the tethers, the attached end and a world with no
awake body; the cost line prints a 1-body and a 40-body scene.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Delete the post-step coupling (carry, cancel/restore, hard_impulse, k_body and
end_force_scale, add_link_load and tension_diff, ymir_soa_apply_particle_impulses,
ymir_particles_step) and replace it with begin, substep and end. The substep runs in
Box3D's new substep callback (extern/box3d moves to the fork's substep-callback commit),
after the biased solve and before positions integrate: each proxy takes the body's pose
at the substep's start and its solved velocity, every correction is lambda / h^2 and
returns to the body as a velocity change there, and Box3D integrates the body to where
the constraint put it. Particle-body contacts run last in each substep. Link tension is
read by momentum balance from the structural impulses past each link.
The deletion and its replacement share one commit: the step cannot build without both.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A body tied to a chain gets its inbound velocity cancelled after the step and the
position error returned as an impulse applied before the next step (a post-step
impulse alone rings at six ticks and cannot read still). Tests: hang, 70 kg hold,
box drag, bodies per kind, overload, split, lane reuse, byte determinism (serial and
eight concurrent worlds), no allocation, cost line, refusals, source negatives.
Top-link tension test is skipped: the sensor misreads heavy loads (see report).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ymir_particles.c (no Box3D) solves XPBD chains with long-range tethers and two-way
coupling to body proxies; soa.c gathers the proxies after Box3D's step, runs the phase
and applies the returned impulses. A world with no particle capacity is byte-identical
to ABI 8 (pinned hashes pass). Managed surface and lanes added; no behaviour tests yet.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The origin-lane test put body A at identity and could not tell the stored local offset
from the world anchor (Soul finding test-blind-local-vs-world). A is now created
translated and rotated; the lane must equal the world anchor at creation and A's current
pose applied to the creation-time local offset after an impulse and 240 steps (1e-4),
and stay within 0.05 m of B's own anchor point. Storing the world anchor in
joint_local_origin_a now fails this test.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The view published each joint's frame orientation but not its origin; a client cannot
infer the anchor from geometry. joint_origin_x/y/z (lanes 12-14, appended) are body A's
transform applied to the frame origin kept at add_joint, refreshed every step. Destroyed
joints read 0 through the existing tombstone clear.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A big sphere with 60 small ones converging has more contacts than graph colours, so Box3D's
scalar overflow path runs: the big lane equals the sum of the small lanes, each its own
momentum change, at restitution 0 and 0.5. A swung arm (ApplyImpulse launches) into a
frictionless slab is exact. The docs say the lane sums magnitudes and is the weight at
rest only on average.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
contact_impulse (N s) replaces last_substep_force in the same lane slot: the sum of
Box3D's stepNormalImpulse over the body's touching manifold points, the normal impulse
contacts delivered over the whole step. The hit fact's impulse replaces impulse_estimate in
the same slot: the same sum over the manifold of the hit's shape pair. The approach-speed
formula (ymir_soa_hit_impulse) and the last-sub-step scaling are gone, with the tests that
pinned their estimates; the new tests check the lane and the hit against momentum change
per step on a jointed forearm (5 kg ball, 0.3 g BB, arm onto a slab), drops, rest and two
free bodies. Build id names the fork commit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
extern/box3d now points at https://eureka.gamecult.org/forge/GameCult/box3d, branch
gamecult/step-normal-impulse (upstream 8441b4a plus the step-impulse field and a static
assert that RELAX_ITERATIONS is 1). Nothing reads the new field yet.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
DestroyJoint takes (lane, generation) and refuses a stale handle, so a repeated
release cannot destroy a later grab in a reused slot. The ABI number moves to 6
so an old and a new native/managed pair fail closed at construction. Fixes Soul
s2 findings.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
destroy_joint releases a motor joint only; its lane reads Removed and is reused
after a step has passed. free_joint_slots lets a caller check before adding an
anchor. After every step anchor velocity is zeroed so a skipped frame flings
nothing. Fixes Soul s1 findings (no release, anchor keeps moving).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Anchor body kind (kinematic, no shape) with set_anchor_target; Motor joint kind
with position springs bounded by max force and torque, taking the slot of the
joint desc's reserved float; apply_impulse at a world point; cast_ray_closest.
Ymir executes the commands and decides nothing about grabbing.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ImpulseEstimate is documented as exact for a centre-to-centre hit between
free bodies, over-counting when one collision yields several hit facts and
undercounting for jointed bodies; never a bound. Tests: two free spheres at
mass ratios 1:1, 1:10, 10:1 with restitution 0 and 0.5, and a hit below the
restitution threshold that must not bounce. The ABI handshake now checks the
touch and hit fact element sizes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>