← 554712910457 · 5566bf611783 →
5553241d87bf
Infer a separator-delimited template cell and stamp it into every other cell marked by one or more zero dots.
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* ((hh (rows g))
(ww (cols g))
(bg (mode g -1))
(sep-rows (for/list ((r (range 0 hh)) #:when
(for/and ((c (range 0 ww))) (zero? (at g r c))))
r))
(sep-cols (for/list ((c (range 0 ww)) #:when
(for/and ((r (range 0 hh))) (zero? (at g r c))))
c))
(all-srows (append (list -1) sep-rows (list hh)))
(all-scols (append (list -1) sep-cols (list ww)))
(row-bounds (for/list ((i (range 0 (- (length all-srows) 1))) #:when
(> (- (list-ref all-srows (+ i 1))
(list-ref all-srows i))
1))
(list (+ (list-ref all-srows i) 1)
(- (list-ref all-srows (+ i 1)) 1))))
(col-bounds (for/list ((i (range 0 (- (length all-scols) 1))) #:when
(> (- (list-ref all-scols (+ i 1))
(list-ref all-scols i))
1))
(list (+ (list-ref all-scols i) 1)
(- (list-ref all-scols (+ i 1)) 1))))
(pattern-rb #f)
(pattern-cb #f)
(dummy (for* ((rb row-bounds) (cb col-bounds))
(unless
pattern-rb
(let ((r1 (first rb))
(r2 (second rb))
(c1 (first cb))
(c2 (second cb)))
(when
(for/or ((r (range r1 (+ r2 1))))
(for/or ((c (range c1 (+ c2 1))))
(let ((v (at g r c)))
(and (!= v bg) (!= v 0)))))
(set! pattern-rb rb)
(set! pattern-cb cb))))))
(pr1 (first pattern-rb))
(pr2 (second pattern-rb))
(pc1 (first pattern-cb))
(pc2 (second pattern-cb))
(ph (+ 1 (- pr2 pr1)))
(pw (+ 1 (- pc2 pc1)))
(pattern (for/list ((dr (range 0 ph)))
(for/list ((dc (range 0 pw))) (at g (+ pr1 dr) (+ pc1 dc)))))
(result (make-hash)))
(for* ((r (range 0 hh)) (c (range 0 ww)))
(hash-set! result (list r c) (at g r c)))
(for* ((rb row-bounds) (cb col-bounds))
(let ((r1 (first rb))
(r2 (second rb))
(c1 (first cb))
(c2 (second cb)))
(when
(and
(not (and (= r1 pr1) (= c1 pc1)))
(for/or ((r (range r1 (+ r2 1))))
(for/or ((c (range c1 (+ c2 1)))) (zero? (at g r c)))))
(for* ((dr (range 0 ph)) (dc (range 0 pw)))
(hash-set! result
(list (+ r1 dr) (+ c1 dc))
(list-ref (list-ref pattern dr) dc))))))
(build-grid hh ww (r c) (hash-ref result (list r c) 0))))))Provenance
- Generator
- generators/5553241d87bf/generator.py
- Notes and decisions
- generators/5553241d87bf/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- b5f6ba93ce67123cb4c48e979b323277bdd284e400329a1e4f332a24707fc23d
- Rule hash
- 064666b78c2e
- Sources
- augmented, training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 5553241d87bf --count 1 --seed 20261108 --test 1