← 9349fabc466a · 93b39d8c4da4 →

938fbbaf1437

A 0-background grid contains two to four separated nested rectangular color-1 frames, optionally inset from the canvas, plus zero to two isolated color-1 singleton components. Recolor every nonzero cell to 1 plus the number of rectangular-frame components whose bounding boxes contain it.

parametric familyframe detectionnesting depthrecolor by depth

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).

Reference rule (Racket)

(rule!
  (let ((dummy 0))
    (define (rect-frame? obj)
      (let ((border
              (remove-duplicates
                (append
                  (for/list ([c (in-range (obj-c1 obj) (+ (obj-c2 obj) 1))]) (list (obj-r1 obj) c))
                  (for/list ([c (in-range (obj-c1 obj) (+ (obj-c2 obj) 1))]) (list (obj-r2 obj) c))
                  (for/list ([r (in-range (obj-r1 obj) (+ (obj-r2 obj) 1))]) (list r (obj-c1 obj)))
                  (for/list ([r (in-range (obj-r1 obj) (+ (obj-r2 obj) 1))]) (list r (obj-c2 obj)))))))
        (and (= (obj-size obj) (length border))
             (all? (lambda (p) (member? p border)) (obj-cells obj)))))
    (define rects (filter rect-frame? (objects g 0)))
    (grid-from-fn (rows g) (cols g)
      (lambda (r c)
        (if (= (at g r c) 0)
            0
            (+ 1
               (count-where
                 (lambda (obj)
                   (and (>= r (obj-r1 obj)) (<= r (obj-r2 obj))
                        (>= c (obj-c1 obj)) (<= c (obj-c2 obj))))
                 rects)))))))

Provenance

Generator
generators/938fbbaf1437/generator.py
Notes and decisions
generators/938fbbaf1437/notes.md
Review label
reviewed_safe
Generator SHA-256
57bf2b35c4e99c9b23fa606cf5b663ed1a430a530e3a837e9fa92e147e55685e
Rule hash
17e4d314e3e9
Sources
bank:6905604d1760
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 938fbbaf1437 --count 1 --seed 20261108 --test 1