← 994f16f93144 · 996fc37f49d9 →
99601629ab88
Extract the color matrix from divider-bounded blocks and flip that matrix left-to-right.
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* ((div-color (find (lambda (clr)
(and
(for/or ((r (range 0 h)))
(for/and ((cc (range 0 w)))
(= (at g r cc) clr)))
(for/or ((cc (range 0 w)))
(for/and ((r (range 0 h)))
(= (at g r cc) clr)))))
(grid-colors g)))
(div-rows (for/list ((r (range 0 h)) #:when
(for/and ((cc (range 0 w))) (= (at g r cc) div-color)))
r))
(div-cols (for/list ((cc (range 0 w)) #:when
(for/and ((r (range 0 h))) (= (at g r cc) div-color)))
cc))
(row-bounds (append (list -1) div-rows (list h)))
(col-bounds (append (list -1) div-cols (list w)))
(row-ranges (filter (lambda (p) (<= (first p) (second p)))
(let loop
((bs row-bounds))
(if (null? (cdr bs))
(list)
(cons (list (+ (car bs) 1)
(- (cadr bs) 1))
(loop (cdr bs)))))))
(col-ranges (filter (lambda (p) (<= (first p) (second p)))
(let loop
((bs col-bounds))
(if (null? (cdr bs))
(list)
(cons (list (+ (car bs) 1)
(- (cadr bs) 1))
(loop (cdr bs)))))))
(nr (length row-ranges))
(nc (length col-ranges)))
(build-grid nr
nc
(r c)
(let* ((rr (list-ref row-ranges r))
(cc (list-ref col-ranges (- (- nc 1) c)))
(r0 (first rr))
(c0 (first cc))
(v (at g r0 c0)))
(if (or (zero? v) (= v div-color)) 0 v)))))))Provenance
- Generator
- generators/99601629ab88/generator.py
- Notes and decisions
- generators/99601629ab88/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 0a9bf206c8910a4023c1d3b5ff8726add507501cf564da25149a7fbde6a99117
- Rule hash
- c856d06245d4
- Sources
- augmented, training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 99601629ab88 --count 1 --seed 20261108 --test 1