← 8e52225f35b8 · 8e7f766c96bf →

8e6c44aee812

Read the main diagonal of the square nested-L staircase. Strip an optional trailing zero padding band, then double the input height and width. Output cell (r,c) is active_diagonal[max(r,c) modulo period]. Repeated active colors are lawful and the final zero is optional.

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))
         ;; Each nested L-band is named by the main-diagonal cell it crosses.
         (diag (for/list ((i (range 0 (min h w))))
                 (at g i i)))
         ;; Trailing zero bands are padding; the nonzero prefix is the period.
         (active-diag
          (let loop ((d diag))
            (if (or (empty? d) (!= (last d) 0))
                d
                (loop (take d (- (length d) 1))))))
         (period (length active-diag))
         (oh (* h 2))
         (ow (* w 2)))
    ;; Continue the staircase in both axes by cycling the active diagonal.
    (build-grid oh ow (r c)
      (nth active-diag (remainder (max r c) period))))))

Provenance

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