← 946e33609350 · 947a1d9ca8f5 →

94755460a402

Select the first rectangular frame matching (0,0), crop its interior to content, and apply the command at (0,1).

parametric familypanel lookupselector legendtransform application

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!
  (let ((selector (at g 0 0))
        (cmd (at g 0 1)))
    (define (rect-frame? obj)
      (and (>= (obj-h obj) 3)
           (>= (obj-w obj) 3)
           (= (obj-size obj) (- (* 2 (+ (obj-h obj) (obj-w obj))) 4))))
    (define (apply-cmd grid code)
      (cond [(= code 1) (rotate-cw grid)]
            [(= code 2) (rotate-180 grid)]
            [(= code 3) (flip-lr grid)]
            [(= code 4) (transpose grid)]
            [else grid]))
    (let* ((chosen (first (filter (lambda (obj) (and (rect-frame? obj)
                                                      (= (obj-color obj) selector)))
                                  (objects g 0))))
           (motif (subgrid g (+ (obj-r1 chosen) 1) (+ (obj-c1 chosen) 1)
                          (- (obj-r2 chosen) 1) (- (obj-c2 chosen) 1))))
      (apply-cmd (crop-to-content motif) cmd))))

Provenance

Generator
generators/94755460a402/generator.py
Notes and decisions
generators/94755460a402/notes.md
Review label
reviewed_safe
Generator SHA-256
f73b69e5853c5eafd91c793f36f3fd4965236e2690343c8fa5f3147300ec7d7f
Rule hash
7c0a4d00e188
Sources
bank:be1bc1d91387
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 94755460a402 --count 1 --seed 20261108 --test 1