feat: crib-anchored scoring + Bifid gather-variant coverage - #4
Merged
Conversation
Two general capabilities distilled from fractionation cryptanalysis work: * crib_anchor: score a guessed crib's best-over-position appearance in a decoded candidate, to anchor an SA objective when the plaintext register (terse, name-heavy, numeric) defeats n-gram fitness. Decoder-agnostic; carries the calibration guidance as code (SWEET_SPOT, crib_length_advice): a short crib floods, an over-long one won't converge, one contiguous ~16-20 letter crib is the sweet spot. * fractionation: bifid6 now takes a `gather` read-order parameter across encode/decode/solve_bifid6 with GATHER_VARIANTS (all 8 seriation orders); the "std" default is fully backward-compatible. Closes a silent-miss blind spot -- several read-orders are statistically indistinguishable, so a solver assuming only the standard order fails quietly on the others. Tested: round-trips for all 8 gather variants, std backward-compat, crib-anchor unit + behavioral. ruff/mypy clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EJjjwhsWqwb5GRvD4QiA5i
Pre-existing formatting drift (byte-identical to main): the repo's `ruff format --check .` now formats fenced code blocks in markdown, and this docs file predates that. Whitespace-only — blank line after import, single space before inline comments. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EJjjwhsWqwb5GRvD4QiA5i
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.
Two general capabilities distilled from fractionation cryptanalysis work:
crib_anchor: score a guessed crib's best-over-position appearance in a decoded candidate, to anchor an SA objective when the plaintext register (terse, name-heavy, numeric) defeats n-gram fitness. Decoder-agnostic; carries the calibration guidance as code (SWEET_SPOT, crib_length_advice): a short crib floods, an over-long one won't converge, one contiguous ~16-20 letter crib is the sweet spot.
fractionation: bifid6 now takes a
gatherread-order parameter across encode/decode/solve_bifid6 with GATHER_VARIANTS (all 8 seriation orders); the "std" default is fully backward-compatible. Closes a silent-miss blind spot -- several read-orders are statistically indistinguishable, so a solver assuming only the standard order fails quietly on the others.Tested: round-trips for all 8 gather variants, std backward-compat, crib-anchor unit + behavioral. ruff/mypy clean.
Claude-Session: https://claude.ai/code/session_01EJjjwhsWqwb5GRvD4QiA5i