Repository navigation
D-PUZZLE-ATTN-0: entropy as the focus of attention on crosswords - #1398
Conversation
Move the #1387 crossword core (codebook, lexicon, grids, compile, token masks + fixed point, creation) unchanged into examples/shared/ crossword_core.rs; crossword_mask_propagation_probe includes it (its 20 tests pass unchanged). New crossword_attention_probe (test = true) varies only the search's slot choice: fixed, random, widest, popcount (log2 count), Shannon under the COCA frequency prior, dom/wdeg. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0177nSSyQaXqbNuGR1vMXXN6
…h only Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0177nSSyQaXqbNuGR1vMXXN6
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0177nSSyQaXqbNuGR1vMXXN6
…ped) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0177nSSyQaXqbNuGR1vMXXN6
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (9)
✨ Finishing Touches📝 Generate docstrings
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce63247ca6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let pc = by_count(&|s| st.count(s) as f64); | ||
| if self.policy == Policy::Popcount { | ||
| let sh = by_count(&|s| self.prior.entropy(st.mask(s)).unwrap_or(-1.0)); |
There was a problem hiding this comment.
Exclude used words before scoring candidate domains
Once any word has been placed, another open slot's mask can still contain that word because the all-different rule is enforced only later by go's st.placed.contains(&w) skip. Consequently this count—and the analogous Shannon and dom/wdeg scores—includes illegal values that the search will never try, so these policies do not actually select by legal domain size or entropy; this can change their ordering and undermines the reported comparisons, especially on empty grids with many same-length slots.
Useful? React with 👍 / 👎.
| let failed = match propagate_token(self.hot, self.puz, &mut next, &mut q) { | ||
| Err(Stop::Contradiction(t)) => { | ||
| self.weight[t as usize] += 1; | ||
| true | ||
| } | ||
| Err(Stop::Language) => unreachable!("one language"), | ||
| Ok(()) => !no_repeats(&next.placed), |
There was a problem hiding this comment.
Separate duplicate-word failures from empty-domain contradictions
When propagation succeeds but forces a word already placed elsewhere, this branch sets failed through !no_repeats and then records it as a contradiction and in fail_trace, even though no slot ran out of candidates and no dom/wdeg weight was incremented. Because the probe defines contradictions as empty domains and reports contradiction rates as evidence about dom/wdeg, any such forced duplicate contaminates the reported rates with a different class of failure; track these separately or attribute them consistently.
Useful? React with 👍 / 👎.
…pped) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0177nSSyQaXqbNuGR1vMXXN6
…-bits-3oe0dq Board: #1398 merge hygiene
What
The question: does entropy work as the focus of attention when solving crosswords?
crates/cognitive-shader-driver/examples/shared/crossword_core.rs. D-PUZZLE-0 step 3: crossword propagation as Cartesian-addressed masking, four arms, cui-bono ablation #1387's own probe now uses it, and its 20 tests still pass.crossword_attention_probe.rs(test = true).2026-10-07-puzzle-attn-0-entropy-attention-crosswords.md;Measured
Release build, 20 created puzzles and 20 empty grids, sides 5 and 7, 200,000 nodes per run.
log2 count)Gates
cargo teststep.Open
🤖 Generated with Claude Code
https://claude.ai/code/session_0177nSSyQaXqbNuGR1vMXXN6
Generated by Claude Code
Summary by CodeRabbit