← e0650802a8fb · e06cc4c752b2 →
e0680a673043
Read rank k from the upper-left and a transform command from the upper-right. Remove both commands, rank the three separated body objects by area descending/color ascending, crop the k-th object, and transform it.
parametric familycommand compositioncroppingranking
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* ((k (at g 0 0))
(cmd (at g 0 (- (cols g) 1)))
(clean (grid-from-fn (rows g) (cols g)
(lambda (r c) (if (or (and (= r 0) (= c 0)) (and (= r 0) (= c (- (cols g) 1)))) 0 (at g r c)))))
(objs (sort (objects clean 0)
(lambda (a b)
(if (= (obj-size a) (obj-size b))
(< (obj-color a) (obj-color b))
(> (obj-size a) (obj-size b))))))
(obj (list-ref objs (- k 1)))
(crop (grid-from-fn (obj-h obj) (obj-w obj)
(lambda (r c)
(let ((rr (+ (obj-r1 obj) r)) (cc (+ (obj-c1 obj) c)))
(if (member? (list rr cc) (obj-cells obj)) (at clean rr cc) 0))))))
(cond [(= cmd 1) (rotate-cw crop)]
[(= cmd 2) (rotate-180 crop)]
[(= cmd 3) (flip-lr crop)]
[else (flip-ud crop)])))Provenance
- Generator
- generators/e0680a673043/generator.py
- Notes and decisions
- generators/e0680a673043/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- f536c73649f8555c3ecd9192dbaa6a749ee354452079e14ed074538dd8459a21
- Rule hash
- 2a70169611d2
- Sources
- bank:26462ff56908
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate e0680a673043 --count 1 --seed 20261108 --test 1