← e937c5b85cdd · e965836d9f92 →

e942ce41cbf5

Normalize the blue(1) mask and red(2) mask. The bottom-left control chooses union(3), intersection(4), or xor(6); the bottom-right control chooses identity(7), clockwise rotation(8), or horizontal reflection(9) for the red mask. Crop the chosen result and recolor it cyan(8). Every three-example lesson covers all operation and transform controls, and generated sparse connected masks make every branch observationally distinct.

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!
  (let ((dummy 0))
    (define (cell<? a b)
      (or (< (first a) (first b))
          (and (= (first a) (first b)) (< (second a) (second b)))))
    (define (norm cells) (sort (normalize-cells cells) cell<?))
    (define (rot cells) (norm (rotate-cells-cw cells)))
    (define (flip-v cells)
      (let* ((n (norm cells)) (cmax (apply max (map second n))))
        (norm (map (lambda (p) (list (first p) (- cmax (second p)))) n))))
    (define a (norm (find-color g 1)))
    (define b0 (norm (find-color g 2)))
    (define op (cond [(not (empty? (find-color g 3))) 0]
                     [(not (empty? (find-color g 4))) 1]
                     [(not (empty? (find-color g 6))) 2]
                     [else 0]))
    (define tr (cond [(not (empty? (find-color g 7))) 0]
                     [(not (empty? (find-color g 8))) 1]
                     [(not (empty? (find-color g 9))) 5]
                     [else 0]))
    (define b (cond [(= tr 1) (rot b0)] [(= tr 5) (flip-v b0)] [else b0]))
    (define (has? p cells) (member? p cells))
    (define res0
      (cond [(= op 0) (remove-duplicates (append a b))]
            [(= op 1) (filter (lambda (p) (has? p b)) a)]
            [else (append (filter (lambda (p) (not (has? p b))) a)
                          (filter (lambda (p) (not (has? p a))) b))]))
    (define res (norm res0))
    (if (empty? res)
        (empty-grid 1 1 0)
        (let* ((bb (bbox-of-cells res))
               (out (empty-grid (+ 1 (third bb)) (+ 1 (fourth bb)) 0)))
          (paint-cells out res 8)))))

Provenance

Generator
generators/e942ce41cbf5/generator.py
Notes and decisions
generators/e942ce41cbf5/notes.md
Review label
reviewed_safe
Generator SHA-256
b2e95fc62d0e6005f1868935d880fe2e9b58eeba0032c48bd84772d048359cb3
Rule hash
7aa66cd7d9ab
Sources
bank:3cb9777539c7
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate e942ce41cbf5 --count 1 --seed 20261108 --test 1