← 68176b5eb124 · 68a312813b77 →
683b2102b08c
Below the full yellow separator, select the uniquely more frequent color as the main shape. Move its complete color mask to the top in the same columns, clear the lower half, and move the other color immediately left of and vertically centered on the main bounding box.
parametric family
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! (lambda (g)
(let* ((h (rows g))
(w (cols g)))
(let* ((bg 7)
(line-row (let loop
((r 0))
(cond
((>= r h) -1)
((for/and ((c (range 0 w))) (= (at g r c) 4)) r)
(else (loop (+ r 1))))))
(cells-below (for*/list ((r (range (+ line-row 1) h)) (c (range 0 w))
#:when
(!= (at g r c) bg))
(list r c (at g r c))))
(below-colors (remove-duplicates (map third cells-below)))
(color-counts (map (lambda (col)
(list col
(count-if (lambda (cc) (= (third cc) col))
cells-below)))
below-colors))
(sorted (sort color-counts (lambda (a b) (> (second a) (second b)))))
(main-color (first (first sorted)))
(main-cells (filter (lambda (cc) (= (third cc) main-color))
cells-below))
(main-r1 (min-of first main-cells))
(main-r2 (max-of first main-cells))
(main-c1 (min-of second main-cells))
(main-c2 (max-of second main-cells))
(main-h (+ 1 (- main-r2 main-r1)))
(base (cellmap g (r c v) (if (= r line-row) 4 bg)))
(g-main (for/fold ((out base))
((cell main-cells))
(set-cell out
(- (first cell) main-r1)
(second cell)
main-color))))
(cond
((< (length sorted) 2) g-main)
(else (let* ((sec-color (first (second sorted)))
(sec-cells (filter (lambda (cc) (= (third cc) sec-color))
cells-below))
(sec-r1 (min-of first sec-cells))
(sec-c1 (min-of second sec-cells))
(sec-r2 (max-of first sec-cells))
(sec-c2 (max-of second sec-cells))
(sec-h (+ 1 (- sec-r2 sec-r1)))
(sec-w (+ 1 (- sec-c2 sec-c1)))
(target-c1 (- (+ main-c1 1) sec-w))
(target-r1 (quotient (- main-h sec-h) 2))
(sec-dr (- target-r1 sec-r1))
(sec-dc (- target-c1 sec-c1)))
(for/fold ((out g-main))
((cell sec-cells))
(let ((nr (+ (first cell) sec-dr))
(nc (+ (second cell) sec-dc)))
(cond
((or (< nr 0) (>= nr h) (< nc 0) (>= nc w)) out)
(else (set-cell out nr nc sec-color))))))))))))Provenance
- Generator
- generators/683b2102b08c/generator.py
- Notes and decisions
- generators/683b2102b08c/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 9c1dd4109ccde1034db0823550fc023e9b278ab21e58461264624ec38ee53c38
- Rule hash
- 0afee0287491
- Sources
- augmented, training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 683b2102b08c --count 1 --seed 20261108 --test 1