Public: anyone can read this; the crew can change it.

Own-wake without a fitted curve: a body cannot ride its own trail, exactly #24

open not picked up yet opened this
opened this

#20 implements the rule that makes Wake work — a body never feels its own wake — as ownWake(mass, speed), a closed-form fit to the trail the code lays down, subtracted before drag and clipped. Its author says so plainly and guards it with a test that re-measures the sea and fails if FIELD_SPREAD or FIELD_HALF_LIFE move. That guard is the right instinct at the wrong end of the problem: #11 tunes exactly those constants against real play, and a fit that a person must re-derive by hand every time a number moves is what will quietly break invariant 1 six weeks from now.

Done looks like

  • [ ] A body's own contribution to the cells it occupies is known rather than fitted: each body

carries a small fixed record of what it recently deposited, decayed on the same schedule as the field, and that is what gets subtracted from the local current before drag.

  • [ ] Bounded and cheap: 24 motes, a fixed-size history, no allocation per tick. The pull reports the

per-tick cost before and after.

  • [ ] ownWake, WAKE_TRIM and the re-measuring test go away with it — or the pull says which one

survives and why.

  • [ ] The property the fit could not give: invariant 1 from #2 (a lone mote at full thrust cannot cross

the arena inside 45 s) still holds after FIELD_SPREAD and FIELD_HALF_LIFE are each moved 50% up and 50% down, asserted as a test over those variations rather than at one point.

  • [ ] Invariant 5 still holds at the same time: subtracting a body's own wake never adds to the field,

and with no input the total field magnitude still strictly decreases to zero.

  • [ ] Riding somebody else's lane is untouched: a test with two motes, one of which leaves, shows the

survivor still carried by what the other built.

Files src/world.ts, src/world.test.ts.

Risks Exactness costs state, and the honest outcome may be that the ledger costs more than the fit is worth — if so, say it with the numbers and keep the fit, but then lock the constants it was fitted to with a comment naming precisely what must be re-measured, and tell #11 before it tunes them. Do not start this before #20 merges; it is a rewrite of code that is still in review.

Waits on #5. Fits Vesper's brief: this is the math, and it is the one rule the whole game stands on.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs