← 067449d7a3b3 · 067f6e037e97 →
06789067e67f
2-4 isolated components sorted by (hole_count desc, area desc, color asc) and packed left-to-right, top-aligned, with one blank column between crops. Tie textures force the area and color tie-breaks to matter.
parametric familyhole countingpackingranking
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).
Reference rule (Racket)
(rule!
(let ((dummy 0))
(define (crop-object obj)
(grid-from-fn (obj-h obj) (obj-w obj)
(lambda (r c)
(let ((rr (+ (obj-r1 obj) r)) (cc (+ (obj-c1 obj) c)))
(if (member? (list rr cc) (obj-cells obj)) (at g rr cc) 0)))))
(define (hole-count crop)
(define seen (make-hash))
(define holes 0)
(for* ([r (in-range (rows crop))] [c (in-range (cols crop))])
(when (and (= (at crop r c) 0) (not (hash-has-key? seen (cons r c))))
(define queue (list (cons r c)))
(define touches #f)
(hash-set! seen (first queue) #t)
(let bfs ([fuel 0])
(unless (empty? queue)
(let ((cur (first queue)))
(set! queue (rest queue))
(when (or (= (car cur) 0) (= (cdr cur) 0) (= (car cur) (- (rows crop) 1)) (= (cdr cur) (- (cols crop) 1)))
(set! touches #t))
(for ([d (in-list cardinal-deltas)])
(let ((nr (+ (car cur) (first d))) (nc (+ (cdr cur) (second d))))
(when (and (in-bounds? nr nc (rows crop) (cols crop))
(= (at crop nr nc) 0)
(not (hash-has-key? seen (cons nr nc))))
(hash-set! seen (cons nr nc) #t)
(set! queue (append queue (list (cons nr nc))))))))
(bfs (+ fuel 1))))
(unless touches (set! holes (+ holes 1)))))
holes)
(define enriched
(sort (map (lambda (obj)
(let ((crop (crop-object obj)))
(list (hole-count crop) (- 0 (obj-size obj)) (obj-color obj) crop)))
(objects g 0))
(lambda (a b)
(cond [(not (= (first a) (first b))) (> (first a) (first b))]
[(not (= (second a) (second b))) (< (second a) (second b))]
[else (< (third a) (third b))]))))
(define crops (map fourth enriched))
(define H (apply max (map rows crops)))
(define W (+ (apply + (map cols crops)) (- (length crops) 1)))
(grid-from-fn H W
(lambda (r c)
(let loop ([remaining crops] [offset 0])
(cond [(empty? remaining) 0]
[(and (>= c offset) (< c (+ offset (cols (first remaining)))))
(if (< r (rows (first remaining))) (at (first remaining) r (- c offset)) 0)]
[else (loop (rest remaining) (+ offset (cols (first remaining)) 1))]))))))Provenance
- Generator
- generators/06789067e67f/generator.py
- Notes and decisions
- generators/06789067e67f/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- dd28dccb32dade2b850d69640b7d24b60857a17e02d5f6bf01f64aa7bebf3f36
- Rule hash
- 82b12cea1db8
- Sources
- bank:cc07013acae1
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 06789067e67f --count 1 --seed 20261108 --test 1