← 46b45dd2aff8 · 4729a9750abc →
46c02325ed3b
A 10..18 by 10..18 zero-background grid has one red(2) source on exactly one non-corner edge. Its edge determines inward gravity. There are 2..5 cyan(8) wall lines perpendicular to gravity, each at least two cells from the flow-axis ends and separated by at least one open row/column. Every wall spans the cross-axis except for 1..3 holes. Ordinary draws use at least three walls and include both shifted and aligned holes. The output is the directed waterfall: move inward, spread sideways in both directions when blocked, fall through every reachable hole, and recolor every visited empty cell to 2.
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)
(let* ((H (rows g)) (W (cols g))
(srcs (find-color g 2))
(s (first srcs)) (sr (first s)) (sc (second s)))
(define water (make-hash))
(define (inb? r c) (and (>= r 0) (< r H) (>= c 0) (< c W)))
(define (wall? r c) (and (inb? r c) (= (cell-at g r c) 8)))
(define (wet? r c) (hash-ref water (cons r c) #f))
;; gravity dir (dr dc) flows inward from source edge; perpendicular (pr pc) is spread axis
(define dr (cond ((= sr 0) 1) ((= sr (- H 1)) -1) (else 0)))
(define dc (cond ((= sc 0) 1) ((= sc (- W 1)) -1) (else 0)))
(define pr (if (= dr 0) 1 0))
(define pc (if (= dr 0) 0 1))
(define (flow r c)
(when (and (inb? r c) (not (wall? r c)) (not (wet? r c)))
(hash-set! water (cons r c) #t)
(let ((nr (+ r dr)) (nc (+ c dc)))
(cond
((not (inb? nr nc)) (void))
((not (wall? nr nc)) (flow nr nc))
(else (side r c pr pc) (side r c (- 0 pr) (- 0 pc)))))))
(define (side r c ur uc)
(let ((nr (+ r ur)) (nc (+ c uc)))
(when (and (inb? nr nc) (not (wall? nr nc)) (not (wet? nr nc)))
(hash-set! water (cons nr nc) #t)
(let ((br (+ nr dr)) (bc (+ nc dc)))
(cond
((not (inb? br bc)) (void))
((not (wall? br bc)) (flow br bc))
(else (side nr nc ur uc)))))))
(hash-set! water (cons sr sc) #t)
(let ((nr (+ sr dr)) (nc (+ sc dc)))
(cond
((not (inb? nr nc)) (void))
((not (wall? nr nc)) (flow nr nc))
(else (side sr sc pr pc) (side sr sc (- 0 pr) (- 0 pc)))))
(grid-from-fn H W (lambda (r c)
(if (hash-ref water (cons r c) #f) 2 (cell-at g r c)))))))Provenance
- Generator
- generators/46c02325ed3b/generator.py
- Notes and decisions
- generators/46c02325ed3b/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 5797070bdf138fc679f2ebee9c364fa89e76f1d3b02c7bea1066917779df1375
- Rule hash
- 253f10f62a51
- Sources
- training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 46c02325ed3b --count 1 --seed 20261108 --test 1