← 27080597d778 · 27387ebf1485 →

270af96a99b0

Place four isolated, distinctly colored polyominoes on a zero background. Extract each tight bbox crop, compute the object's true exposed-edge perimeter, and sort by (perimeter, source top row, source left column) ascending. Pack the normalized crops left-to-right with one zero column between them and top-align them. Scheduled profiles include equal-perimeter components with unequal areas and a concave object whose true perimeter differs from its bbox perimeter.

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 dirs4 (list (list -1 0) (list 1 0) (list 0 -1) (list 0 1))) (define (fifth xs) (list-ref xs 4)) (define (e8b-list< a b) (cond ((empty? a) #f) ((< (first a) (first b)) #t) ((> (first a) (first b)) #f) (else (e8b-list< (rest a) (rest b))))) (define (f4-norm cells) (let* ((bb (bbox-of-cells cells)) (r0 (first bb)) (c0 (second bb))) (map (lambda (p) (list (- (first p) r0) (- (second p) c0))) cells))) (define (f4-norm-info cells) (let* ((bb (bbox-of-cells cells)) (r0 (first bb)) (c0 (second bb)) (r1 (third bb)) (c1 (fourth bb))) (list (f4-norm cells) (+ 1 (- r1 r0)) (+ 1 (- c1 c0))))) (define (f4-perimeter cells) (let ((norm (first (f4-norm-info cells)))) (apply + (map (lambda (p) (length (filter (lambda (d) (not (member? (list (+ (first p) (first d)) (+ (second p) (second d))) norm))) dirs4))) norm)))) (define (f4-pack-shapes items (sep 1)) (if (empty? items) (list) (let* ((h (apply max (map third items))) (w (+ (apply + (map fourth items)) (* sep (- (length items) 1))))) (let loop ((xs items) (left 0) (out (empty-grid h w 0))) (if (empty? xs) out (let* ((item (first xs)) (shape (first item)) (color (second item)) (ih (third item)) (iw (fourth item))) (loop (rest xs) (+ left iw sep) (paint-cells out (map (lambda (p) (list (first p) (+ left (second p)))) shape) color)))))))) (let* ((items (for/list ((obj (in-list (objects g 0)))) (let* ((info (f4-norm-info (obj-cells obj))) (bb (obj-bbox obj))) (list (f4-perimeter (obj-cells obj)) (first bb) (second bb) (first info) (obj-color obj) (second info) (third info))))) (sorted (sort items (lambda (a b) (e8b-list< (take a 3) (take b 3))))) (shapes (map (lambda (item) (list (fourth item) (fifth item) (list-ref item 5) (list-ref item 6))) sorted))) (f4-pack-shapes shapes 1))))

Provenance

Generator
generators/270af96a99b0/generator.py
Notes and decisions
generators/270af96a99b0/notes.md
Review label
reviewed_safe
Generator SHA-256
50dd4badf1fd787f83fcc4266d490d575f8299e1dbfca5f0f8240c74b583b389
Rule hash
cf57cf408f13
Sources
bank:884454e62c49
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 270af96a99b0 --count 1 --seed 20261108 --test 1