← a1ece4864521 · a23328d45092 →

a20ecf84f041

Maroon dividers form two rows by three equal square panels. The top row demonstrates union, intersection, or XOR on occupancy masks; the bottom row supplies a new pair and a blank answer panel. Operand pairs use one non-divider color each (including red on some draws), computed masks are red, and generated demo/query pairs each contain 00, 10, 01, and 11 witnesses.

parametric family

Generated by the released generator before publication; every output was computed by its Racket reference rule. White outlines mark the cells the rule changed. Lesson check:

refuted: a demonstration contradicts the rival. survived_all: it fits every demonstration and also gives the intended answer, so it cannot mislead here. ambiguous: it fits every demonstration but answers the query differently. Names are as declared by the generator; a declared shortcut is not guaranteed to fit the original pairs (see the paper’s Limitations).

Original task pairs

From the source task; the reference rule must reproduce them.

Reference rule (Racket)

(rule! (let ((dummy 0)) (define (t13-full-row grid color) (let ((hits (filter (lambda (r) (all? (lambda (v) (= v color)) (row grid r))) (range (rows grid))))) (if (empty? hits) #f (first hits)))) (define (t13-binary-op a b op) (grid-from-fn (rows a) (cols a) (lambda (r c) (let ((aa (not (= (at a r c) 0))) (bb (not (= (at b r c) 0)))) (if (cond ((equal? op 'union) (or aa bb)) ((equal? op 'intersection) (and aa bb)) (else (not (equal? aa bb)))) 2 0))))) (define (t13-paste-all out obj top left) (for*/fold ((acc out)) ((r (in-range (rows obj))) (c (in-range (cols obj)))) (let ((v (at obj r c)) (rr (+ top r)) (cc (+ left c))) (if (and (not (= v 0)) (in-bounds? rr cc (rows acc) (cols acc))) (set-cell acc rr cc v) acc)))) (let* ((sep-r (t13-full-row g 9)) (sep-cs (filter (lambda (c) (all? (lambda (r) (= (at g r c) 9)) (range (rows g)))) (range (cols g))))) (if (or (not sep-r) (< (length sep-cs) 2)) g (let* ((c1 (first sep-cs)) (c2 (second sep-cs)) (a (subgrid g 0 0 (- sep-r 1) (- c1 1))) (b (subgrid g 0 (+ c1 1) (- sep-r 1) (- c2 1))) (c (subgrid g 0 (+ c2 1) (- sep-r 1) (- (cols g) 1))) (d (subgrid g (+ sep-r 1) 0 (- (rows g) 1) (- c1 1))) (e (subgrid g (+ sep-r 1) (+ c1 1) (- (rows g) 1) (- c2 1))) (op (cond ((equal? (t13-binary-op a b 'union) c) 'union) ((equal? (t13-binary-op a b 'intersection) c) 'intersection) ((equal? (t13-binary-op a b 'xor) c) 'xor) (else 'union))) (f (t13-binary-op d e op))) (t13-paste-all g f (+ sep-r 1) (+ c2 1)))))))

Provenance

Generator
generators/a20ecf84f041/generator.py
Notes and decisions
generators/a20ecf84f041/notes.md
Review label
reviewed_safe
Generator SHA-256
7ba0601757bc93fdfa27bd233427e2b122b5b5831522364d1c0cb1783597c34e
Rule hash
94bd99d7c7c5
Sources
bank:05283c9df3d9
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate a20ecf84f041 --count 1 --seed 20261108 --test 1