← 0b6b3a286ad0 · 0b999a8ea028 →

0b8ba9bb3c63

A cyan(8) rectangle emits yellow(4) horizontal and vertical beams. Non-red colored rectangles clip each beam row or column and are restored on top; red(2) rectangles are transparent and are overwritten where a beam crosses them.

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))
                (objs (objects g 0))
                (cyan (find (lambda (o) (= (obj-color o) 8)) objs)))
           (if (not cyan)
               g
               (let* ((cr1 (obj-r1 cyan))
                      (cc1 (obj-c1 cyan))
                      (cr2 (obj-r2 cyan))
                      (cc2 (obj-c2 cyan))
                      (blockers (filter (lambda (o)
                                          (and
                                            (!= (obj-color o) 2)
                                            (!= (obj-color o) 8)))
                                        objs))
                      (base (reduce (lambda (gg r)
                                      (let* ((left-lim (reduce (lambda (acc b)
                                                                 (let ((bb (obj-bbox b)))
                                                                   (if (and
                                                                         (<= (nth bb 0)
                                                                             r)
                                                                         (<= r
                                                                             (nth bb 2))
                                                                         (< (nth bb 3)
                                                                            cc1))
                                                                       (max acc
                                                                            (nth bb 1))
                                                                       acc)))
                                                               0
                                                               blockers))
                                             (right-lim (reduce (lambda (acc b)
                                                                  (let ((bb (obj-bbox b)))
                                                                    (if (and
                                                                          (<= (nth bb 0)
                                                                              r)
                                                                          (<= r
                                                                              (nth bb 2))
                                                                          (> (nth bb 1)
                                                                             cc2))
                                                                        (min acc
                                                                             (nth bb 3))
                                                                        acc)))
                                                                (- w 1)
                                                                blockers)))
                                        (reduce (lambda (gg2 c)
                                                  (if (and
                                                        (>= c left-lim)
                                                        (<= c right-lim)
                                                        (not (and (>= c cc1) (<= c cc2))))
                                                      (set-cell gg2 r c 4)
                                                      gg2))
                                                gg
                                                (range 0 w))))
                                    g
                                    (range cr1 (+ cr2 1))))
                      (base2 (reduce (lambda (gg c)
                                       (let* ((up-lim (reduce (lambda (acc b)
                                                                (let ((bb (obj-bbox b)))
                                                                  (if (and
                                                                        (<= (nth bb 1)
                                                                            c)
                                                                        (<= c
                                                                            (nth bb 3))
                                                                        (< (nth bb 2)
                                                                           cr1))
                                                                      (max acc
                                                                           (nth bb 0))
                                                                      acc)))
                                                              0
                                                              blockers))
                                              (down-lim (reduce (lambda (acc b)
                                                                  (let ((bb (obj-bbox b)))
                                                                    (if (and
                                                                          (<= (nth bb 1)
                                                                              c)
                                                                          (<= c
                                                                              (nth bb 3))
                                                                          (> (nth bb 0)
                                                                             cr2))
                                                                        (min acc
                                                                             (nth bb 2))
                                                                        acc)))
                                                                (- h 1)
                                                                blockers)))
                                         (reduce (lambda (gg2 r)
                                                   (if (and
                                                         (>= r up-lim)
                                                         (<= r down-lim)
                                                         (not (and
                                                                (>= r cr1)
                                                                (<= r cr2))))
                                                       (set-cell gg2 r c 4)
                                                       gg2))
                                                 gg
                                                 (range 0 h))))
                                     base
                                     (range cc1 (+ cc2 1))))
                      (base3 (reduce (lambda (gg cell)
                                       (set-cell gg (first cell) (second cell) 8))
                                     base2
                                     (obj-cells cyan))))
                 (reduce (lambda (gg b)
                           (reduce (lambda (gg2 cell)
                                     (set-cell gg2
                                               (first cell)
                                               (second cell)
                                               (obj-color b)))
                                   gg
                                   (obj-cells b)))
                         base3
                         blockers))))))

Provenance

Generator
generators/0b8ba9bb3c63/generator.py
Notes and decisions
generators/0b8ba9bb3c63/notes.md
Review label
reviewed_safe
Generator SHA-256
480c7ae04f31b1cd2d48c8b4af0dd9f71ef9365507a557c9fc6d60cb44ddc20d
Rule hash
757441c9ab4a
Sources
augmented, training
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 0b8ba9bb3c63 --count 1 --seed 20261108 --test 1