← 6387de413b52 · 64592477ccc8 →

63a780e1d475

An 8..14 by 9..14 zero-background grid contains 2..4 clear blue(1) endpoint pairs aligned in rows, columns, or both. For every consecutive aligned pair whose original interior is all background, recolor the entire inclusive segment, including both endpoints, red(2).

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 after-rows
      (for/fold ([out g]) ([r (in-range (rows g))])
        (let ((cols1 (filter (lambda (c) (= (at g r c) 1)) (range 0 (cols g)))))
          (foldl (lambda (pair acc)
                   (let ((c1 (first pair)) (c2 (second pair)))
                     (if (and (> (- c2 c1) 1)
                              (all? (lambda (c) (= (at g r c) 0)) (range (+ c1 1) c2)))
                         (paint-cells acc (map (lambda (c) (list r c)) (range c1 (+ c2 1))) 2)
                         acc)))
                 out (pairs cols1)))))
    (for/fold ([out after-rows]) ([c (in-range (cols g))])
      (let ((rows1 (filter (lambda (r) (= (at g r c) 1)) (range 0 (rows g)))))
        (foldl (lambda (pair acc)
                 (let ((r1 (first pair)) (r2 (second pair)))
                   (if (and (> (- r2 r1) 1)
                            (all? (lambda (r) (= (at g r c) 0)) (range (+ r1 1) r2)))
                       (paint-cells acc (map (lambda (r) (list r c)) (range r1 (+ r2 1))) 2)
                       acc)))
               out (pairs rows1))))))

Provenance

Generator
generators/63a780e1d475/generator.py
Notes and decisions
generators/63a780e1d475/notes.md
Review label
reviewed_safe
Generator SHA-256
1c6135766e9d7927f66c2632705fcb9b70101964c83d075c8fa09938767c3aa1
Rule hash
b3ad5e9b6be9
Sources
bank:e57147319d67
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 63a780e1d475 --count 1 --seed 20261108 --test 1