← 185447d509d8 · 18a3c532c9dc →

1856980929fe

A 25..29 by 22..29 black canvas contains one to three separated solid green rectangles with canonical dimensions 2x3, 2x4, 2x5, 3x2, 3x3, or 4x2. For each seed rectangle (r,c,rh,rw), retain the seed and, for every k>=1, stamp rh-by-rw copies at row r+k*rh and columns c-k*rw and c+k*rw, clipping copies at the grid boundary.

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! (lambda (g)
         (let* ((h (rows g))
                (w (cols g)))
           (let ((corners (filter (lambda (x) x)
                                  (flatmap (lambda (r)
                                             (map (lambda (c)
                                                    (and
                                                      (and
                                                        (= (at g r c) 3)
                                                        (or
                                                          (zero? r)
                                                          (!= (at g (- r 1) c) 3))
                                                        (or
                                                          (zero? c)
                                                          (!= (at g r (- c 1)) 3)))
                                                      (let ((rh (let loop
                                                                     ((rr 1))
                                                                     (if (and
                                                                           (< (+ r rr)
                                                                              h)
                                                                           (= (at g
                                                                                  (+ r
                                                                                     rr)
                                                                                  c)
                                                                              3))
                                                                         (loop (+ rr 1))
                                                                         rr)))
                                                            (rw (let loop
                                                                     ((cc 1))
                                                                     (if (and
                                                                           (< (+ c cc)
                                                                              w)
                                                                           (= (at g
                                                                                  r
                                                                                  (+ c
                                                                                     cc))
                                                                              3))
                                                                         (loop (+ cc 1))
                                                                         cc))))
                                                        (list r c rh rw))))
                                                  (range 0 w)))
                                           (range 0 h)))))
             (cellmap g
                      (r c v)
                      (if (or
                            (= v 3)
                            (let loop
                                 ((rs corners))
                                 (if (null? rs)
                                     #f
                                     (let* ((rect (first rs))
                                            (r0 (first rect))
                                            (c0 (second rect))
                                            (rh (third rect))
                                            (rw (fourth rect)))
                                       (if (>= (- r r0) rh)
                                           (let* ((k (quotient (- r r0) rh))
                                                  (row-in-block (modulo (- r r0) rh)))
                                             (if (or
                                                   (let ((nc (- c0 (* k rw))))
                                                     (and (>= c nc) (< c (+ nc rw))))
                                                   (let ((nc (+ c0 (* k rw))))
                                                     (and (>= c nc) (< c (+ nc rw)))))
                                                 #t
                                                 (loop (rest rs))))
                                           (loop (rest rs)))))))
                          3
                          0))))))

Provenance

Generator
generators/1856980929fe/generator.py
Notes and decisions
generators/1856980929fe/notes.md
Review label
reviewed_safe
Generator SHA-256
cf6e08b5e647f09dd3011b3d7ad3652e37df3f7ec354a7a1ba07bb570df22636
Rule hash
77504f6c55fa
Sources
augmented, training
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 1856980929fe --count 1 --seed 20261108 --test 1