← public_eval_28a6681f · public_eval_2b83f449 →
public_eval_291dc1e1
Read two-thick bars using the1/2border axes, normalize vertical bars CCW and center their ordered stack.
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!
(lambda (g)
(define reversed? #f)
(define h (rows g))
(define w (cols g))
(define right? (= (at g 0 (- w 1)) 0))
(define edge (if right? (- w 1) 0))
(define horizontal? (= (at g 0 (if right? 0 1)) 1))
(define mask
(for/list ([r (in-range h)])
(for/list ([c (in-range w)])
(if (and (> r 0) (not (= c edge)) (not (= (at g r c) 8))) 1 0))))
(define bars
(for/list ([obj (objects mask 0)])
(let* ([box (obj-bbox obj)] [r0 (first box)] [c0 (second box)] [r1 (third box)] [c1 (fourth box)]
[x (if right? (- (- w 1) c1) c0)]
[tile (if horizontal?
(for/list ([r (in-range r0 (+ r1 1))]) (for/list ([c (in-range c0 (+ c1 1))]) (at g r c)))
(for/list ([c (in-range c1 (- c0 1) -1)]) (for/list ([r (in-range r0 (+ r1 1))]) (at g r c))))])
(list (if horizontal? r0 x) (if horizontal? x r0) tile))))
(define scan-order
(sort bars (lambda (a b) (or (< (first a) (first b))
(and (= (first a) (first b)) (< (second a) (second b)))))))
(define ordered (if reversed? (reverse scan-order) scan-order))
(define layout-order ordered)
(define packing-width (apply max (map (lambda (b) (length (first (third b)))) ordered)))
(apply append
(for/list ([bar layout-order])
(let* ([tile (third bar)] [pad (quotient (- packing-width (length (first tile))) 2)])
(for/list ([row tile]) (append (make-list pad 8) row (make-list pad 8))))))))
Provenance
- Generator
- generators/public_eval_291dc1e1/generator.py
- Notes and decisions
- generators/public_eval_291dc1e1/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 348fd1f50a23bcc136d3151799380301cb0461c82c4c45f465bd7d5ddff4ca7e
- Rule hash
- 7b17282adb54
- Sources
- evaluation, public_eval:291dc1e1
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate public_eval_291dc1e1 --count 1 --seed 20261108 --test 1