← public_eval_271d71e2 · public_eval_291dc1e1 →

public_eval_28a6681f

Settle blue liquid through nearest downhill openings around solid barriers.

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!
 ;; Blue cells are finite-volume liquid. All other nonzero cells are fixed solid.
 ;; Settle lower droplets first; a droplet crosses its horizontal fluid/air span
 ;; to the nearest empty cell one row below. Equal distances choose the left.
 ;; Each move descends, so it terminates; canvas edges are impermeable.
 (lambda (g)
  (let ()
   (define (drop a r c)
    (if (= r (- h 1)) a
     (let* ((lo (let left ((x c))
                  (if (and (> x 0) (member (at a r (- x 1)) '(0 1))) (left (- x 1)) x)))
            (hi (let right ((x c))
                  (if (and (< x (- w 1)) (member (at a r (+ x 1)) '(0 1))) (right (+ x 1)) x)))
            (holes (filter (lambda (x) (= (at a (+ r 1) x) 0)) (range lo (+ hi 1)))))
       (if (null? holes) a
        (let ((x (pick-min holes (lambda (x) (abs (- x c))))))
         (drop (set-cell (set-cell a r c 0) (+ r 1) x 1) (+ r 1) x))))))
   (for*/fold ((out g)) ((r (range (- h 2) -1 -1)) (c (range w)))
     (if (= (at out r c) 1) (drop out r c) out)))))

Provenance

Generator
generators/public_eval_28a6681f/generator.py
Notes and decisions
generators/public_eval_28a6681f/notes.md
Review label
reviewed_safe
Generator SHA-256
fc14a37d5a179ba3d79a9febfb44d83eea925a3eaa633ad52264c10e516bdb47
Rule hash
566024946b65
Sources
evaluation, public_eval:28a6681f
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate public_eval_28a6681f --count 1 --seed 20261108 --test 1