← 9fc0b6db96fe · 9ff30d18e156 →

9fe97c2dd8a4

A row-0 color-5 marker selects a column. Alternating monochrome bars write squared length codes there; one repeated non-5 length changes the code for the other lengths, while color-5 bars are excluded from the repeated-length census.

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* ((marker (find (lambda (p) p)
                                (for*/list ((r (range 0 h)) (c (range 0 w)))
                                  (and (= (at g r c) 5) (list r c)))))
                  (mc (second marker))
                  (bar-info (filter (lambda (x) x)
                                    (for/list ((r (range 0 h)))
                                      (let ((len (count-if (lambda (c)
                                                             (let ((v (at g r c)))
                                                               (and
                                                                 (!= v 0)
                                                                 (not (and
                                                                        (= r
                                                                           (first marker))
                                                                        (= c mc))))))
                                                           (range 0 w))))
                                        (if (zero? len) #f (list r len))))))
                  (lengths (map second bar-info))
                  (dup-lengths (map second
                                    (filter (lambda (bi)
                                              (not (for/or ((c (range 0 w)))
                                                           (= (at g (first bi) c) 5))))
                                            bar-info)))
                  (dup-len (find (lambda (l)
                                   (> (count-if (lambda (x) (= x l)) dup-lengths) 1))
                                 dup-lengths)))
             (reduce (lambda (acc bi)
                       (let* ((r (first bi))
                              (len (second bi))
                              (base (if (and dup-len (!= len dup-len))
                                        (- len dup-len)
                                        (- len 1)))
                              (val (remainder (* base base) 10)))
                         (set-cell acc r mc val)))
                     g
                     bar-info)))))

Provenance

Generator
generators/9fe97c2dd8a4/generator.py
Notes and decisions
generators/9fe97c2dd8a4/notes.md
Review label
reviewed_safe
Generator SHA-256
fd94fa93f385478fcf37f0ce83f899675c757b0b2d1e5d1cbf36884fafb1b5a5
Rule hash
c7281f787d6e
Sources
training
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 9fe97c2dd8a4 --count 1 --seed 20261108 --test 1