← public_eval_80a900e0 · public_eval_88bcf3b4 →
public_eval_8698868d
No summary in the catalog.
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* ((turn-pattern #f)
(bg (mode g -1))
(foreground (grid-from-fn (rows g) (cols g)
(lambda (r c) (if (= (at g r c) bg) 0 1))))
(components (objects foreground 0))
(board-object (argmax (lambda (o) (* (obj-h o) (obj-w o))) components))
(board-box (obj-bbox board-object))
(board (crop g (first board-box) (second board-box)
(third board-box) (fourth board-box)))
(loose (filter (lambda (o) (not (equal? o board-object))) components))
(hole-count
(lambda (patch)
(length (objects (grid-from-fn (rows patch) (cols patch)
(lambda (r c) (if (= (at patch r c) bg) 1 0))) 0))))
(patterns (map (lambda (o)
(let* ((box (obj-bbox o))
(patch (crop g (first box) (second box) (third box) (fourth box))))
(list (hole-count patch) patch box))) loose))
(n (rows (second (first patterns))))
(side (+ n 2))
(matches
(for*/list ((r (in-range 0 (rows board) side))
(c (in-range 0 (cols board) side)))
(let* ((tile (crop board r c (+ r side -1) (+ c side -1)))
(clue (hole-count tile))
(pattern (first (filter (lambda (p) (= (first p) clue)) patterns))))
(list r c (at tile 0 0) clue (second pattern) (third pattern))))))
(for/fold ((out (grid-from-fn (rows board) (cols board) (lambda (r c) bg)))) ((match (in-list matches)))
(let* ((r0 (first match)) (c0 (second match)) (base (third match))
(patch (if turn-pattern (rotate-cw (fifth match)) (fifth match))))
(for*/fold ((next out)) ((r (in-range side)) (c (in-range side)))
(set-cell next (+ r0 r) (+ c0 c)
(if (and (< 0 r (- side 1)) (< 0 c (- side 1))
(not (= (at patch (- r 1) (- c 1)) bg)))
(at patch (- r 1) (- c 1)) base)))))))
Provenance
- Generator
- generators/public_eval_8698868d/generator.py
- Notes and decisions
- generators/public_eval_8698868d/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 0eba967e4fc58544665f0bac220d7814ce0ec2ddc2e5904c757c12b155eaa86b
- Rule hash
- 6fd48cdc010b
- Sources
- evaluation, public_eval:8698868d
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate public_eval_8698868d --count 1 --seed 20261108 --test 1