← 8862d66fbb3d · 888fb4310749 →
8881f54cf3c8
Read (0,0) as op key. Normalize color-2 cells (excluding the key) as A and every color-3 cell as B; thus an op-3 key participates in B. Apply 1=union, 2=intersection, 3=xor, 4=A-minus-B, then paint the result color 4.
alignmentbooleanshape_algebra
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 (normalize-cell-list cells) (if (empty? cells) (list) (let* ((bb (bbox-of-cells cells)) (r0 (first bb)) (c0 (second bb))) (sort (map (lambda (p) (list (- (first p) r0) (- (second p) c0))) cells) cell<)))) (define (mask-grid cells h w color) (paint-cells (empty-grid h w 0) cells color)) (let* ((op (at g 0 0)) (a (normalize-cell-list (filter (lambda (p) (not (equal? p (list 0 0)))) (find-color g 2)))) (b (normalize-cell-list (find-color g 3))) (h1 (if (empty? a) 1 (+ 1 (apply max (map first a))))) (w1 (if (empty? a) 1 (+ 1 (apply max (map second a))))) (h2 (if (empty? b) 1 (+ 1 (apply max (map first b))))) (w2 (if (empty? b) 1 (+ 1 (apply max (map second b))))) (hh (max h1 h2)) (ww (max w1 w2)) (res (cond ((= op 1) (remove-duplicates (append a b))) ((= op 2) (filter (lambda (p) (member? p b)) a)) ((= op 3) (append (filter (lambda (p) (not (member? p b))) a) (filter (lambda (p) (not (member? p a))) b))) (else (filter (lambda (p) (not (member? p b))) a))))) (mask-grid res hh ww 4))))
Provenance
- Generator
- generators/8881f54cf3c8/generator.py
- Notes and decisions
- generators/8881f54cf3c8/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 08f925892b5a1f39d9b8312899ae1a20c90ce98346ea1b9f5b58aa76e2653eb7
- Rule hash
- d4cbbd7307ee
- Sources
- bank:ecfb302aa617
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 8881f54cf3c8 --count 1 --seed 20261108 --test 1