← 1e26763a6f70 · 1e7c25b06dac →
1e7a6ba0bb90
Read transform (1=CW, 2=LR, 3=UD) and operation (4=union, 5=intersection, 6=XOR) by color in row 0. Transform the left motif, align both local origins, combine masks, and crop a color-8 result; empty gives [[0]].
booleanoutput_resizetransforms
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 (object-grid grid obj) (subgrid grid (obj-r1 obj) (obj-c1 obj) (obj-r2 obj) (obj-c2 obj))) (define (transform-key grid key) (cond ((= key 1) (rotate-cw grid)) ((= key 2) (flip-lr grid)) ((= key 3) (flip-ud grid)) ((= key 4) (rotate-180 grid)) (else grid))) (define (grid-crop-to-content grid cells) (subgrid grid (apply min (map first cells)) (apply min (map second cells)) (apply max (map first cells)) (apply max (map second cells)))) (define (apply-boolean a b op) (let* ((h (max (rows a) (rows b))) (w (max (cols a) (cols b))) (raw (grid-from-fn h w (lambda (r c) (let ((aa (and (< r (rows a)) (< c (cols a)) (not (= (at a r c) 0)))) (bb (and (< r (rows b)) (< c (cols b)) (not (= (at b r c) 0))))) (if (cond ((= op 4) (or aa bb)) ((= op 5) (and aa bb)) ((= op 6) (not (equal? aa bb))) (else #f)) 8 0))))) (cells (filter (lambda (p) (not (= (at raw (first p) (second p)) 0))) (grid-positions raw)))) (if (empty? cells) (grid (list 0)) (grid-crop-to-content raw cells)))) (define top-values (row g 0)) (define tkey (first (filter (lambda (v) (member v (list 1 2 3))) top-values))) (define okey (first (filter (lambda (v) (member v (list 4 5 6))) top-values))) (define temp (for/fold ((out g)) ((c (in-range (cols g)))) (if (member (at out 0 c) (list 1 2 3 4 5 6)) (set-cell out 0 c 0) out))) (define objs (sort (objects temp 0) (lambda (a b) (cond ((not (= (obj-c1 a) (obj-c1 b))) (< (obj-c1 a) (obj-c1 b))) ((not (= (obj-r1 a) (obj-r1 b))) (< (obj-r1 a) (obj-r1 b))) (else (< (obj-color a) (obj-color b))))))) (define a (transform-key (object-grid temp (first objs)) tkey)) (define b (object-grid temp (second objs))) (apply-boolean a b okey)))
Provenance
- Generator
- generators/1e7a6ba0bb90/generator.py
- Notes and decisions
- generators/1e7a6ba0bb90/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- f2e3e653f292273c18c65d7b453f082cc1763786c23874de1e85fff1b22e3b5e
- Rule hash
- cb29ce937e33
- Sources
- bank:cedcb02251c0
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 1e7a6ba0bb90 --count 1 --seed 20261108 --test 1