← 8801696784e1 · 8811ea806605 →

881173b7bc9d

Extract intact four-connected monochromatic frame interiors, order by left edge, and concatenate with one zero column and top alignment. Sample damaged distractors, diagonal same-color contacts, multicolor contents, canonical profiles, and broader frame counts and dimensions.

containmentextractionrelayout

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* ((frames (sort (filter (lambda (obj)
                                  (let* ((h (obj-h obj)) (w (obj-w obj))
                                         (border-size (- (* h w) (* (max 0 (- h 2)) (max 0 (- w 2))))))
                                    (and (>= h 3) (>= w 3) (= (obj-size obj) border-size)
                                         (all? (lambda (p)
                                                 (or (= (first p) (obj-r1 obj)) (= (first p) (obj-r2 obj))
                                                     (= (second p) (obj-c1 obj)) (= (second p) (obj-c2 obj))))
                                               (obj-cells obj)))))
                                (objects g 0))
                         (lambda (a b) (< (obj-c1 a) (obj-c1 b)))))
         (interiors (map (lambda (obj) (subgrid g (+ (obj-r1 obj) 1) (+ (obj-c1 obj) 1) (- (obj-r2 obj) 1) (- (obj-c2 obj) 1))) frames)))
    (if (empty? interiors)
        (list (list 0))
        (let ((out-h (apply max (map rows interiors)))
              (out-w (+ (apply + (map cols interiors)) (max 0 (- (length interiors) 1)))))
          (let pack ([remaining interiors] [left 0] [out (empty-grid out-h out-w 0)])
            (if (empty? remaining)
                out
                (let* ((sub (first remaining))
                       (next (for*/fold ([acc out])
                                         ([r (in-range (rows sub))]
                                          [c (in-range (cols sub))])
                               (let ((v (at sub r c)))
                                 (if (not (= v 0)) (set-cell acc r (+ left c) v) acc)))))
                  (pack (rest remaining) (+ left (cols sub) 1) next))))))))

Provenance

Generator
generators/881173b7bc9d/generator.py
Notes and decisions
generators/881173b7bc9d/notes.md
Review label
reviewed_safe
Generator SHA-256
a68e1912ecdae752ee5ba79a298789a3b49b14f163264009b82d19be22f471d9
Rule hash
b87fde7ab095
Sources
bank:ca0e5b777526
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 881173b7bc9d --count 1 --seed 20261108 --test 1