← 646eeb47599b · 64758b03899f →

6470a9c16f7b

Fill nested hollow frames by the smallest enclosing frame's color.

multi-layer fillingnested framesregion ownership

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 (frame? obj)
      (let* ((h (obj-h obj))
             (w (obj-w obj))
             (perim (+ (* 2 w) (* 2 (- h 2)))))
        (and (>= h 3) (>= w 3)
             (= (obj-size obj) perim)
             (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)))))
    (define frames
      (sort (filter frame? (objects g 0))
            (lambda (a b) (< (* (obj-h a) (obj-w a)) (* (obj-h b) (obj-w b))))))
    (fold-cells g g
      (lambda (out r c v)
        (if (not (= v 0))
            out
            (let ((hits (filter (lambda (fr)
                                  (and (< (obj-r1 fr) r) (< r (obj-r2 fr))
                                       (< (obj-c1 fr) c) (< c (obj-c2 fr))))
                                frames)))
              (if (empty? hits) out (set-cell out r c (obj-color (first hits))))))))))

Provenance

Generator
generators/6470a9c16f7b/generator.py
Notes and decisions
generators/6470a9c16f7b/notes.md
Review label
reviewed_safe
Generator SHA-256
b659105fcd8d0e04ec213932c9caa8e006d7139ed626dee3381f089c48710705
Rule hash
81c80e14ec8d
Sources
bank:fe45a3aa7042
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 6470a9c16f7b --count 1 --seed 20261108 --test 1