← ef03216cf2fa · efdd2b265cc8 →

efb59efe0080

A canonical-size 0-background canvas contains one connected red (2) mask and one connected green (3) mask. Crop each mask to its own bbox, align their top-left corners, XOR occupancy into cyan (8), then crop the XOR. Consecutive lessons alternate crop-required and crop-noop counterexamples.

boolean compositiondynamic-size outputshape normalization

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 (mask color)
      (let ((bb (bbox-of-cells (find-color g color))))
        (grid-from-fn (+ (- (third bb) (first bb)) 1)
                      (+ (- (fourth bb) (second bb)) 1)
          (lambda (r c)
            (if (= (at g (+ (first bb) r) (+ (second bb) c)) color) 1 0)))))
    (let* ((a (mask 2))
           (b (mask 3))
           (h (max (rows a) (rows b)))
           (w (max (cols a) (cols b)))
           (xor-grid
            (grid-from-fn h w
              (lambda (r c)
                (let ((av (and (< r (rows a)) (< c (cols a)) (= (at a r c) 1)))
                      (bv (and (< r (rows b)) (< c (cols b)) (= (at b r c) 1))))
                  (if (or (and av (not bv)) (and bv (not av))) 8 0))))))
      (crop-to-content xor-grid))))

Provenance

Generator
generators/efb59efe0080/generator.py
Notes and decisions
generators/efb59efe0080/notes.md
Review label
reviewed_safe
Generator SHA-256
0317cd7ebf2fd286ff60e54b72c1c7e002cb75cc581f6dd8523250c1ed5eaf53
Rule hash
1cb444e6f050
Sources
bank:8ed83d4e427b
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate efb59efe0080 --count 1 --seed 20261108 --test 1