← e69a3b575440 · e706449ebf4c →
e6cf1120a17d
BG-colored grid (h ∈ 7-30, w ∈ 7-30, by difficulty) painted uniformly with one bg color fixed to 0, containing: (a) ONE SOLID RECTANGLE of size rh × rw (rh ∈ 5..h-2, rw ∈ 5..w-2, both ≥5) at random interior position (rr, rc) with ≥1-cell margin from all grid edges, painted in rect_color (distinct from 0). (b) AT THE RECTANGLE'S FOUR INSIDE-CORNER CELLS — (rr+1, rc+1), (rr+1, rc+rw-2), (rr+rh-2, rc+1), (rr+rh-2, rc+rw-2) — paint 4 DISTINCT non-{0, rect_color} colors drawn from {0..9}. Rule (CLEAR THE FOUR INSIDE CORNERS (SET TO BACKGROUND 0) AND PLACE THE 4 CORNER COLORS AT THE FOUR DIAGONALLY-OPPOSITE OUTSIDE CORNERS OF THE RECTANGLE): IDENTIFY the rectangle (solid rect_color region) and its 4 inside-corner cells with their distinct colors c0, c1, c2, c3 (TL, TR, BL, BR of inside). CLEAR the 4 inside-corner marker cells to background 0, leaving four holes in the rectangle. PAINT the 4 OUTSIDE-CORNER cells of the rectangle: (rr-1, rc-1)=c3 (diagonally opposite TL→BR-corner), (rr-1, rc+rw)=c2 (TR→BL), (rr+rh, rc-1)=c1 (BL→TR), (rr+rh, rc+rw)=c0 (BR→TL). Net: inside colors jump to the diagonally-opposite outside corners while their former cells become background.
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)))
(begin
(define cf (color-frequency g))
(define non-bg-colors (filter (lambda (c) (!= c 0)) (grid-colors g)))
(define rect-color
(let loop
((cs non-bg-colors) (best (first non-bg-colors)) (best-cnt 0))
(if (null? cs)
best
(let ((cnt (hash-ref cf (first cs))))
(if (> cnt best-cnt)
(loop (cdr cs) (first cs) cnt)
(loop (cdr cs) best best-cnt))))))
(define rect-cells (find-color g rect-color))
(define rs (map first rect-cells))
(define cs (map second rect-cells))
(define r1 (min-list rs))
(define r2 (max-list rs))
(define c1 (min-list cs))
(define c2 (max-list cs))
(define tl-in (list (+ r1 1) (+ c1 1)))
(define tr-in (list (+ r1 1) (- c2 1)))
(define bl-in (list (- r2 1) (+ c1 1)))
(define br-in (list (- r2 1) (- c2 1)))
(define tl-c (at g (first tl-in) (second tl-in)))
(define tr-c (at g (first tr-in) (second tr-in)))
(define bl-c (at g (first bl-in) (second bl-in)))
(define br-c (at g (first br-in) (second br-in)))
(define tl-out (list (- r1 1) (- c1 1)))
(define tr-out (list (- r1 1) (+ c2 1)))
(define bl-out (list (+ r2 1) (- c1 1)))
(define br-out (list (+ r2 1) (+ c2 1)))
(define g1 (set-cell g (first tl-in) (second tl-in) 0))
(define g2 (set-cell g1 (first tr-in) (second tr-in) 0))
(define g3 (set-cell g2 (first bl-in) (second bl-in) 0))
(define g4 (set-cell g3 (first br-in) (second br-in) 0))
(define g5 (set-cell g4 (first br-out) (second br-out) tl-c))
(define g6 (set-cell g5 (first bl-out) (second bl-out) tr-c))
(define g7 (set-cell g6 (first tr-out) (second tr-out) bl-c))
(set-cell g7 (first tl-out) (second tl-out) br-c)))))Provenance
- Generator
- generators/e6cf1120a17d/generator.py
- Notes and decisions
- generators/e6cf1120a17d/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- aaf11f444daa8300b1004c94680c066578f32544ab56f73c60f5856077278efd
- Rule hash
- bb462daeea6b
- Sources
- augmented, training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate e6cf1120a17d --count 1 --seed 20261108 --test 1