← 3bb94038f4e2 · 3c05b058b793 →
3c01bf0d6576
Read non-zero 4-connected components in bounding-box reading order. The first two crops A and A' demonstrate one non-identity transform from {rotate 90 CW, rotate 180, transpose, flip LR, flip UD}. Infer that transform from the full coloured crops, then apply it to the full bounding-box crop of the third component B and output only that transformed crop. A disconnected satellite inside B's bbox is therefore included.
parametric familyanalogycrop outputtransform 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 (apply-transform grid cmd)
(cond [(= cmd 0) grid]
[(= cmd 1) (rotate-cw grid)]
[(= cmd 2) (rotate-180 grid)]
[(= cmd 3) (transpose grid)]
[(= cmd 4) (flip-lr grid)]
[else (flip-ud grid)]))
;; Components are 4-connected across all non-zero colours.
(define (nonzero-components grid)
(let loop ([remaining (filter-cells grid (lambda (r c v) (not (= v 0))))] [acc (list)])
(if (empty? remaining)
(reverse acc)
(let* ((start (first remaining))
(cells (connected-region grid (first start) (second start)
(lambda (r c v) (not (= v 0))) 4)))
(loop (filter (lambda (p) (not (member? p cells))) remaining)
(cons cells acc))))))
(define (crop-cells cells)
;; Crop from the original grid, so any disconnected cell inside this
;; component's bbox remains part of the visible motif.
(let ((bb (bbox-of-cells cells)))
(subgrid g (first bb) (second bb) (third bb) (fourth bb))))
;; Reading order chooses A, A', then B; later components are ignored except
;; when crop-cells includes them inside one of those bounding boxes.
(let* ((components (sort (nonzero-components g)
(lambda (a b)
(let ((ba (bbox-of-cells a)) (bb (bbox-of-cells b)))
(if (= (first ba) (first bb))
(< (second ba) (second bb))
(< (first ba) (first bb)))))))
(a (crop-cells (first components)))
(ap (crop-cells (second components)))
(b (crop-cells (third components)))
(cmd (find-first (lambda (t) (equal? (apply-transform a t) ap)) (list 0 1 2 3 4 5))))
(apply-transform b (if (eq? cmd #f) 0 cmd)))))Provenance
- Generator
- generators/3c01bf0d6576/generator.py
- Notes and decisions
- generators/3c01bf0d6576/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 502f9392a794516894b2b4601ff667fe21a8138ba591403d8d242782ed734183
- Rule hash
- 3722dcd853de
- Sources
- bank:868e1a8cbe17
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 3c01bf0d6576 --count 1 --seed 20261108 --test 1