← 595eebab5aea · 59a9a5c505fb →
59a7762bc6da
Recolor every gray 8-connected component containing a diagonal run of length at least three.
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)
(define (mem? cells r c)
(find-first (lambda (p) (and (= (fst p) r) (= (snd p) c))) cells))
(define (run-from cells r c dr dc)
(let loop ((rr r) (cc c) (n 1))
(if (mem? cells (+ rr dr) (+ cc dc))
(loop (+ rr dr) (+ cc dc) (+ n 1))
n)))
;; longest chain of cells stepping consistently in one diagonal direction
(define (maxdiag cells)
(apply max 1
(flatmap (lambda (p)
(map (lambda (d)
(let ((dr (fst d)) (dc (snd d)))
(if (mem? cells (- (fst p) dr) (- (snd p) dc))
1
(run-from cells (fst p) (snd p) dr dc))))
(list (list 1 1) (list 1 -1))))
cells)))
(foldl (lambda (obj acc)
(let ((cells (obj-cells obj)))
(if (>= (maxdiag cells) 3)
(recolor-cells acc cells 8)
acc)))
g (objects-8 g 7))))Provenance
- Generator
- generators/59a7762bc6da/generator.py
- Notes and decisions
- generators/59a7762bc6da/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 561990a5943f15f0be95377574fa0b750ce6db9c3be597295c786bcb9615be1d
- Rule hash
- 108478b11257
- Sources
- training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 59a7762bc6da --count 1 --seed 20261108 --test 1