← dc2c4869445c · dc657616ec21 →
dc382c7da9a9
Paint each blank cell whose wall-constrained distance to the red and green seeds is equal.
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* ((a (first (find-color g 2)))
(b (first (find-color g 3))))
(define (dist-from start)
(define dist (make-hash))
(define queue (list (cons (first start) (second start))))
(hash-set! dist (first queue) 0)
(let bfs ([step 0])
(unless (empty? queue)
(let ((cur (first queue)))
(set! queue (rest queue))
(for ([d (in-list cardinal-deltas)])
(let ((nr (+ (car cur) (first d)))
(nc (+ (cdr cur) (second d))))
(when (and (in-bounds? nr nc (rows g) (cols g))
(not (= (at g nr nc) 5))
(not (hash-has-key? dist (cons nr nc))))
(hash-set! dist (cons nr nc) (+ (hash-ref dist cur) 1))
(set! queue (append queue (list (cons nr nc))))))))
(bfs (+ step 1))))
dist)
(define da (dist-from a))
(define db (dist-from b))
(grid-from-fn (rows g) (cols g)
(lambda (r c)
(if (and (= (at g r c) 0)
(hash-has-key? da (cons r c))
(hash-has-key? db (cons r c))
(= (hash-ref da (cons r c)) (hash-ref db (cons r c))))
8
(at g r c))))))Provenance
- Generator
- generators/dc382c7da9a9/generator.py
- Notes and decisions
- generators/dc382c7da9a9/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- f25f2f9f9c1229fe5c87fbe795ee5ae2cbd3707e07187d4f1aebac5705868b49
- Rule hash
- ab92485ef393
- Sources
- bank:0d41ded5f4cd
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate dc382c7da9a9 --count 1 --seed 20261108 --test 1