← 5f6fdf4f9900 · 5f94fa359992 →

5f8abe24cffe

Infer the first dihedral transform mapping tightly cropped frame A to B, then apply it to cropped frame C.

analogycroppingtransform inference

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).

Reference rule (Racket)

(rule!
  (let ((dummy 0))
    (define (rect-frame? obj)
      (and (= (obj-color obj) 1)
           (>= (obj-h obj) 3)
           (>= (obj-w obj) 3)
           (= (obj-size obj) (- (* (obj-h obj) (obj-w obj))
                                (* (- (obj-h obj) 2) (- (obj-w obj) 2))))
           (all? (lambda (p)
                   (or (= (first p) (obj-r1 obj))
                       (= (first p) (obj-r2 obj))
                       (= (second p) (obj-c1 obj))
                       (= (second p) (obj-c2 obj))))
                 (obj-cells obj))))
    (define (transform-code grid code)
      (cond [(= code 1) grid]
            [(= code 2) (rotate-cw grid)]
            [(= code 3) (rotate-180 grid)]
            [(= code 4) (transpose grid)]
            [(= code 5) (flip-lr grid)]
            [else (flip-ud grid)]))
    (define frames
      (sort (filter rect-frame? (objects g 0))
            (lambda (a b)
              (if (= (obj-r1 a) (obj-r1 b))
                  (< (obj-c1 a) (obj-c1 b))
                  (< (obj-r1 a) (obj-r1 b))))))
    (define (inner-crop obj)
      (crop-to-content
        (subgrid g (+ (obj-r1 obj) 1) (+ (obj-c1 obj) 1)
                 (- (obj-r2 obj) 1) (- (obj-c2 obj) 1))))
    (if (< (length frames) 3)
        (list (list 0))
        (let* ((A (inner-crop (first frames)))
               (B (inner-crop (second frames)))
               (C (inner-crop (third frames)))
               (code (let ((hit (find-first (lambda (t) (equal? (transform-code A t) B))
                                            (list 1 2 3 4 5 6))))
                       (if hit hit 1))))
          (transform-code C code)))))

Provenance

Generator
generators/5f8abe24cffe/generator.py
Notes and decisions
generators/5f8abe24cffe/notes.md
Review label
reviewed_safe
Generator SHA-256
7c1d31bb308eabb1bf38f1a5779b12fbe98607743e30ae2ab68ed975fbda05b6
Rule hash
634d31594fbf
Sources
bank:edd0efb19ea0
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 5f8abe24cffe --count 1 --seed 20261108 --test 1