← e0ef0cfeaf88 · e1516c24afbd →

e14a91c50791

Place two to four rotation-classes of separate red polyominoes; exactly one class occurs once or three times and every other class occurs twice. The rule fills every odd-class object's bounding box with orange.

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 red-objs (filter (lambda (obj) (= (obj-color obj) 2)) (objects g 0)))
    (define (same-pos? a b)
      (and (= (fst a) (fst b)) (= (snd a) (snd b))))
    (define (has-cell? p cells)
      (any? (lambda (q) (same-pos? p q)) cells))
    (define (same-cells? a b)
      (and (= (length a) (length b))
           (all? (lambda (p) (has-cell? p b)) a)))
    (define (rotations cells)
      (let* ((r0 (normalize-cells cells))
             (r1 (normalize-cells (rotate-cells-cw r0)))
             (r2 (normalize-cells (rotate-cells-cw r1)))
             (r3 (normalize-cells (rotate-cells-cw r2))))
        (list r0 r1 r2 r3)))
    (define (same-rot-shape? a b)
      (let ((sa (normalize-cells (obj-cells a)))
            (rots (rotations (obj-cells b))))
        (any? (lambda (rb) (same-cells? sa rb)) rots)))
    (define (same-count obj)
      (count-where (lambda (other) (same-rot-shape? obj other)) red-objs))
    (define targets (filter (lambda (obj) (= (remainder (same-count obj) 2) 1)) red-objs))
    (define (inside-target-bbox? r c)
      (any?
        (lambda (obj)
          (and (>= r (obj-r1 obj)) (<= r (obj-r2 obj))
               (>= c (obj-c1 obj)) (<= c (obj-c2 obj))))
        targets))
    (grid-from-fn h w
      (lambda (r c)
        (if (inside-target-bbox? r c) 7 (cell-at g r c))))))

Provenance

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