Skip to content

Sieve - #21

Open
mikroskeem wants to merge 1 commit into
Wynncraft:mainfrom
mikroskeem:sieve
Open

Sieve#21
mikroskeem wants to merge 1 commit into
Wynncraft:mainfrom
mikroskeem:sieve

Conversation

@mikroskeem

Copy link
Copy Markdown

@clrxbl made me do it. Commit description contains details, Claude refined wording and implemented cleanups

@mikroskeem
mikroskeem force-pushed the sieve branch 2 times, most recently from 32bec90 to ca759fc Compare August 18, 2026 04:11
Reduces the problem before searching it, rather than searching with pruning
bolted on.

Three passes run first. Items with no requirements and no negative bonus are in
every optimum, so they get banked. A skill nobody requires never shows up in an
equip check or a need term, so bonuses on it are unobservable and the skill is
dropped; same for a skill whose worst reachable value already clears every
bound. Then any item that is non-negative on the surviving skills and requires
no volatile one cannot break another item or be broken by one, so it is equipped
as soon as it fits.

Dropping skills is the main win. It makes Aphotic's -80 DEX and Moontower's -40
DEF free instead of branch triggers, and the canonical build comes out at 2
branch items from 23.

Caching is part of the design because this runs on the tick loop. Every player
is rechecked every tick through one instance, so consecutive calls are different
players and a last-answer cache never fires. A 2048 entry two-way table covers
the 100-200 players a shard holds. Direct-mapped would let two colliding players
evict each other every tick forever. Keys are the exact equipment references
plus assigned SP, verified by content, so they self-invalidate and a hash
collision costs a solve rather than a wrong answer.

120/120 on the existing suite, and no mismatches against the reference solver
added in the next commit.

At 150 players per tick: 217ns mean, 709ns p99, 0.033ms for the whole tick.
Against a 50ms budget every correct entry is already free, so treat this as
headroom rather than a differentiator.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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