← 4de2bae05c7d · 4e081a15d785 →
4e05481a2c21
Canonical-scale 5..8 x 10..16 grids with two separated, distinctly colored hollow objects. Enclosed hole unions can be rectangular, nonrectangular, or split into multiple regions; complex profiles also include an exterior bbox corner. The rule extracts only enclosed zero regions, crops each union, recolors it by its object, and packs patterns left-to-right with one background column.
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 (fifth xs) (list-ref xs 4)) (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 (nx-hole-cells cells) (let* ((bb (bbox-of-cells cells)) (r0 (first bb)) (c0 (second bb)) (info (f4-norm-info cells)) (norm (first info)) (h (second info)) (w (third info)) (mask (paint-cells (empty-grid h w 0) norm 1)) (regions (filter (lambda (region) (not (any? (lambda (p) (or (= (first p) 0) (= (first p) (- h 1)) (= (second p) 0) (= (second p) (- w 1)))) region))) (find-0-regions mask 0)))) (apply append (map (lambda (region) (map (lambda (p) (list (+ r0 (first p)) (+ c0 (second p)))) region)) regions)))) (define (nx-hpack-shapes items) (if (empty? items) (list) (let* ((h (apply max (map second items))) (w (+ (apply + (map third items)) (- (length items) 1)))) (let loop ((xs items) (left 0) (out (empty-grid h w 0))) (if (empty? xs) out (let ((shape (first (first xs))) (ih (second (first xs))) (iw (third (first xs))) (color (fourth (first xs)))) (loop (rest xs) (+ left iw 1) (paint-cells out (map (lambda (p) (list (first p) (+ left (second p)))) shape) color)))))))) (let* ((items (filter values (for/list ((obj (in-list (objects g 0)))) (let ((holes (nx-hole-cells (obj-cells obj)))) (if (empty? holes) #f (let* ((hbb (bbox-of-cells holes)) (local (map (lambda (p) (list (- (first p) (first hbb)) (- (second p) (second hbb)))) holes)) (cbb (obj-bbox obj))) (list (second cbb) local (+ 1 (- (third hbb) (first hbb))) (+ 1 (- (fourth hbb) (second hbb))) (obj-color obj)))))))) (sorted (sort items (lambda (a b) (< (first a) (first b))))) (pack-items (map (lambda (item) (list (second item) (third item) (fourth item) (fifth item))) sorted))) (if (empty? pack-items) (list) (nx-hpack-shapes pack-items)))))
Provenance
- Generator
- generators/4e05481a2c21/generator.py
- Notes and decisions
- generators/4e05481a2c21/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 5c48db7df2d19349f48317ba6ccc18aaa4234323eb24ffd198945fc8fdb89547
- Rule hash
- e13b35a51ff4
- Sources
- bank:391ca7d21fbe
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 4e05481a2c21 --count 1 --seed 20261108 --test 1