← 529bd4803bcc · 52d56c2a0191 →

52ac31926856

Remove the blue (1) drop, follow its column downward through the red (2) open-top containers, and fill the first bounded section whose entire floor is solid red. A floor with any gap leaks, so the drop continues to the next lower container; if every candidate leaks, color the whole bottom row blue. Adjacent red dividers delimit independent sections.

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* ((bp (first (find-color g 1)))
                  (bc (snd bp))
                  (g2 (set-cell g (fst bp) (snd bp) 0))
                  (red-objs (filter (lambda (o) (= (obj-color o) 2)) (objects g 0)))
                  (candidate-data (filter (lambda (x) x)
                                          (map (lambda (o)
                                                 (let* ((bb (obj-bbox o))
                                                        (frame-r0 (first bb))
                                                        (frame-r1 (third bb))
                                                        (left-wall (find (lambda (c)
                                                                           (= (at g
                                                                                  frame-r0
                                                                                  c)
                                                                              2))
                                                                         (reverse (range 0
                                                                                         bc))))
                                                        (right-wall (let ((rw (find (lambda (c)
                                                                                      (= (at g
                                                                                             frame-r0
                                                                                             c)
                                                                                         2))
                                                                                    (range (+ bc
                                                                                              1)
                                                                                           w))))
                                                                      (if rw
                                                                          rw
                                                                          (and
                                                                            (= (at g
                                                                                   frame-r0
                                                                                   bc)
                                                                               2)
                                                                            bc)))))
                                                   (and
                                                     (and
                                                       left-wall
                                                       right-wall
                                                       (< left-wall right-wall))
                                                     (let* ((sec-c0 (+ left-wall 1))
                                                            (sec-c1 (- right-wall 1))
                                                            (floor-solid (for/and ((c (range sec-c0
                                                                                             (+ sec-c1
                                                                                                1))))
                                                                                  (= (at g
                                                                                         frame-r1
                                                                                         c)
                                                                                     2))))
                                                       (list frame-r0
                                                             frame-r1
                                                             sec-c0
                                                             sec-c1
                                                             floor-solid)))))
                                               red-objs)))
                  (chosen (find (lambda (x) (fifth x)) (sort-by candidate-data first))))
             (if chosen
                 (reduce (lambda (g3 r)
                           (reduce (lambda (g4 c)
                                     (if (zero? (at g4 r c)) (set-cell g4 r c 1) g4))
                                   g3
                                   (range (third chosen) (+ (fourth chosen) 1))))
                         g2
                         (range (first chosen) (second chosen)))
                 (reduce (lambda (g3 c) (set-cell g3 (- h 1) c 1)) g2 (range 0 w)))))))

Provenance

Generator
generators/52ac31926856/generator.py
Notes and decisions
generators/52ac31926856/notes.md
Review label
reviewed_safe
Generator SHA-256
5cf21d82caf927090ea518b9abe552198c90edee2d6f3da70c414e4a74cc5d5d
Rule hash
afd3c4e6c015
Sources
training
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 52ac31926856 --count 1 --seed 20261108 --test 1