← 0005ab5b7704 · 0083f06314c3 →
004ca3500787
A 0-background grid contains 3-5 halo-separated red polyominoes. All but one are the same free shape under rotation/reflection; output the singleton class as its canonical cyan tight-bbox mask.
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 (shape-key cells) (format "~a" (sort (normalize-cells cells) cell<?)))
(define (rot90 cells)
(let ((h (+ 1 (apply max (map first cells)))))
(normalize-cells (map (lambda (p) (list (second p) (- h 1 (first p)))) cells))))
(define (rotate cells k)
(let loop ([i 0] [cur (normalize-cells cells)])
(if (= i (modulo k 4)) cur (loop (+ i 1) (rot90 cur)))))
(define (reflect-v cells)
(let* ((norm (normalize-cells cells))
(w (+ 1 (apply max (map second norm)))))
(normalize-cells (map (lambda (p) (list (first p) (- w 1 (second p)))) norm))))
(define (variants cells)
(remove-duplicates
(append* (map (lambda (k)
(let ((rot (rotate cells k)))
(list (normalize-cells rot) (rotate (reflect-v cells) k))))
(list 0 1 2 3)))))
(define (canonical cells)
(first (sort (variants cells) (lambda (a b) (string<? (shape-key a) (shape-key b))))))
(define comps (filter (lambda (o) (= (obj-color o) 2)) (objects g 0)))
(define counts (make-hash))
(for ([obj (in-list comps)])
(hash-update! counts (shape-key (canonical (obj-cells obj))) add1 0))
(define odd (first (filter (lambda (o) (= (hash-ref counts (shape-key (canonical (obj-cells o)))) 1)) comps)))
(let* ((cells (canonical (obj-cells odd)))
(h (+ 1 (apply max (map first cells))))
(w (+ 1 (apply max (map second cells)))))
(grid-from-fn h w (lambda (r c) (if (member? (list r c) cells) 8 0))))))Provenance
- Generator
- generators/004ca3500787/generator.py
- Notes and decisions
- generators/004ca3500787/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 47cccb50e5a74b99c406706f9d1aeb15100451b53640e28eafc5216440574ef9
- Rule hash
- 18bdd6911037
- Sources
- bank:53ccebf2a36f
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 004ca3500787 --count 1 --seed 20261108 --test 1