← b57f299dcdb3 · b5b012cd97d9 →

b5af3d6b3cd5

Color-5 walls form an outer frame plus complete interior divider rows and columns. Treat every wall-separated room independently. In each room column, move all nonzero markers downward into the lowest available cells while preserving their top-to-bottom order; keep every wall fixed.

parametric familycolumnwise motionlocal gravitywall segmentation

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 dirs4 (list (list -1 0) (list 1 0) (list 0 -1) (list 0 1))) (define (regions-without-wall grid wall-color) (let loop-pos ((positions (grid-positions grid)) (seen (list)) (acc (list))) (cond ((empty? positions) (reverse acc)) ((or (member? (first positions) seen) (= (at grid (first (first positions)) (second (first positions))) wall-color)) (loop-pos (rest positions) seen acc)) (else (let bfs ((queue (list (first positions))) (seen2 (cons (first positions) seen)) (cells (list))) (if (empty? queue) (loop-pos (rest positions) seen2 (cons (sort cells cell<) acc)) (let* ((cur (first queue)) (nbrs (filter (lambda (p) (and (in-bounds? (first p) (second p) (rows grid) (cols grid)) (not (member? p seen2)) (not (= (at grid (first p) (second p)) wall-color)))) (map (lambda (d) (list (+ (first cur) (first d)) (+ (second cur) (second d)))) dirs4)))) (bfs (append (rest queue) nbrs) (append seen2 nbrs) (cons cur cells))))))))) (for/fold ((out (grid-from-fn (rows g) (cols g) (lambda (r c) (if (= (at g r c) 5) 5 0))))) ((room (in-list (regions-without-wall g 5)))) (let* ((bb (bbox-of-cells room)) (r0 (first bb)) (c0 (second bb)) (r1 (third bb)) (c1 (fourth bb))) (for/fold ((acc out)) ((c (in-range c0 (+ c1 1)))) (let* ((col-cells (filter (lambda (r) (member? (list r c) room)) (range r0 (+ r1 1)))) (vals (filter (lambda (v) (not (= v 0))) (map (lambda (r) (at g r c)) col-cells))) (start (- (length col-cells) (length vals)))) (for/fold ((acc2 acc)) ((r (in-list col-cells)) (i (in-naturals))) (if (>= i start) (set-cell acc2 r c (list-ref vals (- i start))) acc2))))))))

Provenance

Generator
generators/b5af3d6b3cd5/generator.py
Notes and decisions
generators/b5af3d6b3cd5/notes.md
Review label
reviewed_safe
Generator SHA-256
76cfb4e4ae8e52bbec79ad5e36f52146dc7130a626843f77061c89198eb35028
Rule hash
f37a4766f778
Sources
bank:0eb6e7ee3b18
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate b5af3d6b3cd5 --count 1 --seed 20261108 --test 1