← 1b6b40a92e4f · 1b9d8370e28b →

1b7cbdffd485

Order colors by row-major first appearance; emit a column when the first-cell row span is at least the column span, otherwise emit a row.

parametric family

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* ((order (reduce (lambda (acc rc)
                                   (let* ((r (/ rc w))
                                          (c (mod rc w))
                                          (v (at g r c)))
                                     (if (and
                                           (> v 0)
                                           (not (find (lambda (x) (= x v)) acc)))
                                         (append acc (list v))
                                         acc)))
                                 (list)
                                 (range 0 (* h w))))
                  (first-cells (reduce (lambda (acc rc)
                                         (let* ((r (/ rc w))
                                                (c (mod rc w))
                                                (v (at g r c)))
                                           (if (and
                                                 (> v 0)
                                                 (not (find (lambda (x) (= (first x) v))
                                                            acc)))
                                               (append acc (list (list v r c)))
                                               acc)))
                                       (list)
                                       (range 0 (* h w))))
                  (rs (map second first-cells))
                  (cs (map third first-cells))
                  (row-span (- (max-list rs) (min-list rs)))
                  (col-span (- (max-list cs) (min-list cs)))
                  (n (length order)))
             (if (>= row-span col-span)
                 (build-grid n 1 (r c) (nth order r))
                 (build-grid 1 n (r c) (nth order c)))))))

Provenance

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