Skip to content

D-PUZZLE-ATTN-0: entropy as the focus of attention on crosswords - #1398

Merged
AdaWorldAPI merged 4 commits into
mainfrom
claude/epistemicstate5-ce64-bits-3oe0dq
Oct 7, 2026
Merged

AdaWorldAPI merged 4 commits into
mainfrom
claude/epistemicstate5-ce64-bits-3oe0dq

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

What

The question: does entropy work as the focus of attention when solving crosswords?

Measured

Release build, 20 created puzzles and 20 empty grids, sides 5 and 7, 200,000 nodes per run.

policy prove: solved prove: nodes open: solved open: nodes / to first fill: solved
fixed 16/20 852,535 7/20 2,858,517 / 2,488,660 5/20
random 15/20 1,049,801 5/20 3,151,741 / 2,572,628 0/20
widest 16/20 916,437 5/20 3,186,550 / 2,653,695 10/20
popcount (log2 count) 20/20 58,729 20/20 570,450 / 91,930 10/20
Shannon (COCA-weighted) 19/20 348,578 16/20 1,156,793 / 550,562 10/20
dom/wdeg 20/20 53,892 20/20 539,520 / 40,938 10/20
  • Uniform entropy focuses the search. On "prove", popcount needs 14.5× fewer nodes than fixed order.
  • Frequency-weighted Shannon misdirects it. It needs 5.9× popcount's nodes, and picks a different slot on 36–50% of decisions.
    • A frequency prior measures how predictable a slot is. A search pays for how many candidates it must try.
  • Earlier contradictions help the search reach a first fill sooner. dom/wdeg gets to its first fill about 2× sooner on open puzzles. Within a search, the contradiction rate stays flat (0.73–0.85).
  • A slot with no candidates has no entropy under either reading. A test pins this.

Gates

  • 9 tests run by the shader-driver cargo test step.
  • 7 disable runs, each red on its named falsifier.
  • The dom/wdeg falsifier was vacuous on first write. It now compares only the search path.
  • clippy and fmt clean.
  • entries index and supersession index current.

Open

  • Shannon is untested as value ordering.
  • Coverage: one prior, one vocabulary, sides 5 and 7 only.
  • No CE64 register in this loop.

🤖 Generated with Claude Code

https://claude.ai/code/session_0177nSSyQaXqbNuGR1vMXXN6


Generated by Claude Code

Summary by CodeRabbit

  • New Features
    • Added a crossword-solving comparison that evaluates six slot-selection strategies across generated, partially filled, and empty puzzles.
    • The evaluation found that Popcount and DomWdeg solved all 20 generated and open puzzles tested. Frequency-weighted Shannon solved fewer and used more search nodes than Popcount.
  • Documentation
    • Added experiment notes and updated project records with the comparison’s findings and limitations.

claude added 4 commits October 7, 2026 23:34
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
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
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: ab3aebc7-b7dd-4b5e-b09a-3b01bb860183
📥 Commits

Reviewing files that changed from the base of the PR and between 4a0a72c and ce63247.

📒 Files selected for processing (9)
  • .claude/board/LATEST_STATE.md
  • .claude/board/PR_ARC_INVENTORY.md
  • .claude/board/STATUS_BOARD.md
  • .claude/board/entries/2026-10-07-puzzle-attn-0-entropy-attention-crosswords.md
  • .claude/board/entries/README.md
  • crates/cognitive-shader-driver/Cargo.toml
  • crates/cognitive-shader-driver/examples/crossword_attention_probe.rs
  • crates/cognitive-shader-driver/examples/crossword_mask_propagation_probe.rs
  • crates/cognitive-shader-driver/examples/shared/crossword_core.rs
 _____________________________________________________________________________________________________________________________________________________
< Progress in a fixed context is almost always a form of optimization. Creative acts generally don't stay in the context that they are in. - Alan Kay >
 -----------------------------------------------------------------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T23:44:46.076047Z ce63247 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@AdaWorldAPI
AdaWorldAPI merged commit 89694cc into main Oct 7, 2026
8 of 10 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +208 to +210
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));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +249 to +255
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),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

AdaWorldAPI pushed a commit that referenced this pull request Oct 7, 2026
…pped)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177nSSyQaXqbNuGR1vMXXN6
AdaWorldAPI added a commit that referenced this pull request Oct 8, 2026
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.

2 participants