Skip to content

fix(port): a split random keeps its weights - #124

Merged
sp00ktober merged 2 commits into
mainfrom
port/split-draw
Oct 22, 2026
Merged

sp00ktober merged 2 commits into
mainfrom
port/split-draw

Conversation

@sp00ktober

@sp00ktober sp00ktober commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #123. MHFU's random reads the entity's counter (+0x322 & 0x1F) without advancing it; rng_step/rng_step2 only add 1. A split random's inner pick read its outer's draw + 1, confined to its group's band: in each of the Zinogre's 10 splits 4-6 of 14-16 arms were never taken.

  • Split (brain/splice.py): one rounding over all arms; layout puts each inner random over its group's band of the same draw, unstepped, so every value takes the arm a single 32-way pick would. A group of one arm is its body.
  • Checker (em/script/draw.py, the one place for pick semantics): a random that opens a branch of a random reads its parent's draw, so it is not CORRELATED_DRAW; a branch its band never reaches is ARM_UNREACHABLE (warning). CORRELATED_DRAW's text says a step does not decorrelate (owner: draws after a draw stay, as in MHFU's own scripts).
  • Zinogre splice: 57 routines, +11234 B, worst run 123; CORRELATED_DRAW 35 → 15, no ARM_UNREACHABLE, every live donor arm of each split reached. Brute: container unchanged.

Tests: the layout over four weight sets (one totalling 90), stepping, the checker, draw; with game data, the Zinogre's splits and the Brute.

Live (lane 3 re-run with #125, #126 and #121, 5880 s, two quests): every one of the 145 leaf arms of the 10 splits reachable; 90 taken in 394 picks (the two enraged-and-tired splits never came up).

🤖 Generated with Claude Code

sp00ktober and others added 2 commits October 22, 2026 10:21
A random that opens a branch of a random reads the draw its parent read, so it is no
CORRELATED_DRAW; its branches the parent's band never reaches are ARM_UNREACHABLE. The
CORRELATED_DRAW text says the draw is a counter a step only adds 1 to. `draw` holds the pick's
semantics once (take, spans, nested); `catalogue.shares` uses it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A donor random of more than 13 arms is an outer random over groups and an inner per group. MHFU's
random reads the entity's draw without advancing it, so the inner read the outer's value (plus 1,
after a step) confined to its group's band and 4-6 arms of each of the Zinogre's splits were never
taken. The weights are now rounded once over all arms and each inner is laid out over its band of
the outer's draw, unstepped: every value takes the arm one random over all of them would.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@sp00ktober
sp00ktober changed the base branch from port/zinogre-brain to main October 22, 2026 21:59
@sp00ktober
sp00ktober merged commit 0dd895d into main Oct 22, 2026
5 checks passed
@sp00ktober
sp00ktober deleted the port/split-draw branch October 22, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant