← c5a69e7cd8c8 · c5c5f3f84f12 →

c5a80b7a3acc

Independently placed connected red/green shapes: any 7 selects their normalized intersection; otherwise XOR. Color 9 is irrelevant. Exact overlap, unequal areas, empty answers and tight cropping are supported.

parametric familyheader-controlled operationsnormalized cropsset logic

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 (offset< a b) (if (= (first a) (first b)) (< (second a) (second b)) (< (first a) (first b)))) (define (find-single grid color) (first (filter (lambda (obj) (= (obj-color obj) color)) (objects grid 0)))) (define (markers grid color) (sort (find-color grid color) cell<)) (define (normalize-offsets offsets) (if (empty? offsets) (list) (let* ((r0 (apply min (map first offsets))) (c0 (apply min (map second offsets)))) (sort (map (lambda (p) (list (- (first p) r0) (- (second p) c0))) offsets) offset<)))) (define (relative-offsets obj anchor) (let* ((ar (cond ((= anchor 0) (obj-r1 obj)) ((= anchor 1) (obj-r1 obj)) ((= anchor 2) (obj-r2 obj)) (else (obj-r2 obj)))) (ac (cond ((= anchor 0) (obj-c1 obj)) ((= anchor 1) (obj-c2 obj)) ((= anchor 2) (obj-c1 obj)) (else (obj-c2 obj))))) (sort (map (lambda (p) (list (- (first p) ar) (- (second p) ac))) (obj-cells obj)) offset<))) (define (crop-cells cells (color 8)) (if (empty? cells) (grid (list 0)) (paint-cells (empty-grid (+ 1 (- (apply max (map first cells)) (apply min (map first cells)))) (+ 1 (- (apply max (map second cells)) (apply min (map second cells)))) 0) (normalize-offsets cells) color))) (define header (if (empty? (markers g 7)) 9 7)) (define a (relative-offsets (find-single g 2) 0)) (define b (relative-offsets (find-single g 3) 0)) (define cells (if (= header 7) (filter (lambda (p) (member p b)) a) (sort (append (filter (lambda (p) (not (member p b))) a) (filter (lambda (p) (not (member p a))) b)) offset<))) (crop-cells cells 8)))

Provenance

Generator
generators/c5a80b7a3acc/generator.py
Notes and decisions
generators/c5a80b7a3acc/notes.md
Review label
reviewed_safe
Generator SHA-256
f0f0a91ec4699b91b0a6ca565f1591975103c463047cb3dc00c5253f8aa813a9
Rule hash
db99a498afde
Sources
bank:40f7bd2c7916
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate c5a80b7a3acc --count 1 --seed 20261108 --test 1