← 70f97d6b605b · 71492f8cef8f →

7147e98f8173

Rotate the red asymmetric template according to the blue corner (TL/TR/BR/BL = 0/90/180/270 degrees clockwise), translate it by the green-to-orange vector, and draw the result in cyan on a blank canvas.

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 ((dummy 0))
    (define (rot90 cells)
      (let ((h (+ 1 (apply max (map first cells)))))
        (normalize-cells (map (lambda (p) (list (second p) (- h 1 (first p)))) cells))))
    (define (rotate cells k)
      (let loop ([i 0] [cur (normalize-cells cells)])
        (if (= i (modulo k 4)) cur (loop (+ i 1) (rot90 cur)))))
    (define ctrl (first (find-color g 1)))
    (define code (cond [(and (= (first ctrl) 0) (= (second ctrl) 0)) 0]
                       [(and (= (first ctrl) 0) (= (second ctrl) (- (cols g) 1))) 1]
                       [(and (= (first ctrl) (- (rows g) 1)) (= (second ctrl) (- (cols g) 1))) 2]
                       [else 3]))
    (define a (first (find-color g 3)))
    (define b (first (find-color g 6)))
    (define dr (- (first b) (first a)))
    (define dc (- (second b) (second a)))
    (define shape (obj-cells (first (filter (lambda (o) (= (obj-color o) 2)) (objects g 0)))))
    (define bb (bbox-of-cells shape))
    (define trans (rotate shape code))
    (for/fold ([out (empty-grid (rows g) (cols g) 0)]) ([p (in-list trans)])
      (let ((r (+ (first bb) dr (first p)))
            (c (+ (second bb) dc (second p))))
        (if (in-bounds? r c (rows g) (cols g))
            (set-cell out r c 8)
            out)))))

Provenance

Generator
generators/7147e98f8173/generator.py
Notes and decisions
generators/7147e98f8173/notes.md
Review label
reviewed_safe
Generator SHA-256
6bd8c7d28389a00fa034c8a29fbb1f2c92bc0e2b0b93eb1d461b9af567e668ca
Rule hash
228397e84af8
Sources
bank:53ccebf2a36f
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 7147e98f8173 --count 1 --seed 20261108 --test 1