Sieve - #21
Open
mikroskeem wants to merge 1 commit into
Open
Conversation
mikroskeem
force-pushed
the
sieve
branch
2 times, most recently
from
August 18, 2026 04:11
32bec90 to
ca759fc
Compare
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@clrxbl made me do it. Commit description contains details, Claude refined wording and implemented cleanups