← 250a48232c34 · 2534c7164e36 →

252ff772a276

Select the rectangular 1-frame with most interior 2-seeds, tie-break topmost then leftmost, crop it, and fill interior zeros with color 3.

parametric familycount comparisoncropped transformationframe ranking

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)
      (and (= (obj-color obj) 1)
           (>= (obj-h obj) 3)
           (>= (obj-w obj) 3)
           (= (obj-size obj) (- (* 2 (+ (obj-h obj) (obj-w obj))) 4))))
    (define (seed-count obj)
      (count-where (lambda (p) (= (at g (first p) (second p)) 2))
                   (positions-in-rect (+ (obj-r1 obj) 1) (+ (obj-c1 obj) 1)
                                      (- (obj-r2 obj) 1) (- (obj-c2 obj) 1))))
    (define chosen
      (first (sort (filter rect-frame? (objects g 0))
                   (lambda (a b)
                     (let ((sa (seed-count a)) (sb (seed-count b)))
                       (cond [(not (= sa sb)) (> sa sb)]
                             [(not (= (obj-r1 a) (obj-r1 b))) (< (obj-r1 a) (obj-r1 b))]
                             [else (< (obj-c1 a) (obj-c1 b))]))))))
    (let ((crop (subgrid g (obj-r1 chosen) (obj-c1 chosen) (obj-r2 chosen) (obj-c2 chosen))))
      (for*/fold ([out crop])
                 ([r (in-range 1 (- (rows crop) 1))]
                  [c (in-range 1 (- (cols crop) 1))])
        (if (= (at out r c) 0) (set-cell out r c 3) out)))))

Provenance

Generator
generators/252ff772a276/generator.py
Notes and decisions
generators/252ff772a276/notes.md
Review label
reviewed_safe
Generator SHA-256
72ff11fcc16b122fe5b4e955183272715ac091936be06530888d3bc9f69b72b1
Rule hash
40bcdf750b85
Sources
bank:e06827914c5c
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 252ff772a276 --count 1 --seed 20261108 --test 1