← d62a0e470ae8 · d6607fc42bcc →
d65b2dd82d74
Pair vertical bars by color and exact row span, in left-to-right disjoint pairs. Includes multiple same-color pairs and unmatched span/odd-bar witnesses.
object pairingrectangle completionsame-color fill
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).
Reference rule (Racket)
(rule! (let ((dummy 0)) (define (bar? obj) (and (= (obj-c1 obj) (obj-c2 obj)) (= (obj-size obj) (+ 1 (- (obj-r2 obj) (obj-r1 obj)))) (>= (obj-size obj) 2))) (define (bar-key bar) (list (obj-color bar) (obj-r1 bar) (obj-r2 bar))) (define (same-key? a b) (and (= (first a) (first b)) (= (second a) (second b)) (= (third a) (third b)))) (define (unique-keys keys) (let loop ((remaining keys) (acc (list))) (cond ((empty? remaining) acc) ((any? (lambda (k) (same-key? k (first remaining))) acc) (loop (rest remaining) acc)) (else (loop (rest remaining) (append acc (list (first remaining)))))))) (let* ((bars (filter bar? (objects g 0))) (keys (unique-keys (map bar-key bars)))) (for/fold ((out g)) ((key (in-list keys))) (let* ((matching (filter (lambda (bar) (same-key? (bar-key bar) key)) bars)) (cols (sort (map obj-c1 matching) <)) (color (first key)) (r1 (second key)) (r2 (third key))) (let pair-loop ((remaining cols) (acc out)) (if (< (length remaining) 2) acc (let ((c1 (first remaining)) (c2 (second remaining))) (pair-loop (rest (rest remaining)) (for*/fold ((a acc)) ((r (in-range r1 (+ r2 1))) (c (in-range c1 (+ c2 1)))) (set-cell a r c color)))))))))))
Provenance
- Generator
- generators/d65b2dd82d74/generator.py
- Notes and decisions
- generators/d65b2dd82d74/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 7a54fb01857dcbd6637c26bd114eccfe103f6ef3f910b7ce777cb6233b7b5578
- Rule hash
- 220859949b76
- Sources
- bank:b87bafc16aa7
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate d65b2dd82d74 --count 1 --seed 20261108 --test 1