← 06da3d8c94fe · 079291c08c15 →
0701a2c36d45
Read the three rotation codes in the first row. Split the remaining input at full color-9 rows into three equal panels, rotate each panel's nonzero occupancy by its code (1=0°, 2=90°, 3=180°, 4=270° clockwise), and output a panel-sized grid whose cells are color 8 exactly where at least two rotated panels are occupied.
header decoding, panel-wise transforms, voting after alignment
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 (render-same-size cells h w (color 8)) (paint-cells (empty-grid h w 0) (filter (lambda (p) (in-bounds? (first p) (second p) h w)) cells) color)) (define (panel-occ panel) (sort (filter (lambda (p) (let ((v (at panel (first p) (second p)))) (and (not (= v 0)) (not (= v 9))))) (grid-positions panel)) cell<)) (define (split-rows-9 grid) (let loop ((r 0) (start 0) (acc (list))) (cond ((>= r (rows grid)) (reverse (if (< start (rows grid)) (cons (subgrid grid start 0 (- (rows grid) 1) (- (cols grid) 1)) acc) acc))) ((all? (lambda (c) (= (at grid r c) 9)) (range 0 (cols grid))) (let scan ((rr r)) (if (and (< rr (rows grid)) (all? (lambda (c) (= (at grid rr c) 9)) (range 0 (cols grid)))) (scan (+ rr 1)) (loop rr rr (if (< start r) (cons (subgrid grid start 0 (- r 1) (- (cols grid) 1)) acc) acc))))) (else (loop (+ r 1) start acc))))) (define (rotate-cells cells) (let* ((norm (normalize-cells cells))) (if (empty? norm) norm (let ((h (+ 1 (apply max (map first norm))))) (normalize-cells (map (lambda (p) (list (second p) (- h 1 (first p)))) norm)))))) (define (rotate-times-cells cells k) (let loop ((cur cells) (n (modulo k 4))) (if (= n 0) (normalize-cells cur) (loop (rotate-cells cur) (- n 1))))) (define (majority-cells panels k) (let ((cells (remove-duplicates (flatmap panel-occ panels)))) (filter (lambda (p) (>= (count-where (lambda (panel) (member? p (panel-occ panel))) panels) k)) cells))) (let* ((panels (split-rows-9 g)) (header (first panels)) (pans (rest panels)) (transformed (for/list ((pair (in-list (enumerate-list pans)))) (let* ((i (first pair)) (panel (second pair)) (raw (at header 0 i)) (k (cond ((= raw 1) 0) ((= raw 2) 1) ((= raw 3) 2) ((= raw 4) 3) (else 0))) (cells (rotate-times-cells (panel-occ panel) k))) (render-same-size cells (rows panel) (cols panel) 8)))) (p (first pans))) (render-same-size (majority-cells transformed 2) (rows p) (cols p) 8))))
Provenance
- Generator
- generators/0701a2c36d45/generator.py
- Notes and decisions
- generators/0701a2c36d45/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 21684db161734b5f174a398518e313bb0ed76198b4ace6be25ccaabcce256589
- Rule hash
- 606946fe96ab
- Sources
- bank:0938460c498b
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 0701a2c36d45 --count 1 --seed 20261108 --test 1