← 1229e88ae0e6 · 1261cb825a44 →
1238481b674b
On an orange-7 grid, exactly four gray-5 cells define a square: three are square corners and one is a strictly interior distractor. Infer the missing square corner. Paint color 8 on the two square sides incident to that missing corner and on the diagonal joining the other two corners. Paint only orange cells, so all four gray markers are preserved.
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))
;; Exactly four gray cells are present: three square-bbox corners and
;; one interior distractor. The bbox extremes identify the square.
(marks (find-color g 5))
(r0 (min-of fst marks))
(r1 (max-of fst marks))
(c0 (min-of snd marks))
(c1 (max-of snd marks))
(d (- r1 r0))
(tl? (= (at g r0 c0) 5))
(tr? (= (at g r0 c1) 5))
(bl? (= (at g r1 c0) 5))
;; The absent bbox corner determines the triangle orientation.
(missing (cond ((not tl?) 0)
((not tr?) 1)
((not bl?) 2)
(else 3))))
;; Paint only orange background cells, preserving all four gray clues.
(define (paint-if-bg acc r c)
(if (and (in-bounds? r c h w) (= (at acc r c) 7))
(set-cell acc r c 8)
acc))
(define (paint-h acc r ca cb)
(reduce (lambda (a c) (paint-if-bg a r c))
acc
(range ca (+ cb 1))))
(define (paint-v acc c ra rb)
(reduce (lambda (a r) (paint-if-bg a r c))
acc
(range ra (+ rb 1))))
(define (paint-diag-down acc)
(reduce (lambda (a k) (paint-if-bg a (+ r0 k) (+ c0 k)))
acc
(range 0 (+ d 1))))
(define (paint-diag-up acc)
(reduce (lambda (a k) (paint-if-bg a (+ r0 k) (- c1 k)))
acc
(range 0 (+ d 1))))
;; Draw the two square sides incident to the missing corner and the
;; diagonal joining the other two present corners.
(cond
((zero? missing)
(paint-diag-up (paint-v (paint-h g r0 c0 c1) c0 r0 r1)))
((= missing 1)
(paint-diag-down (paint-v (paint-h g r0 c0 c1) c1 r0 r1)))
((= missing 2)
(paint-diag-down (paint-v (paint-h g r1 c0 c1) c0 r0 r1)))
(else
(paint-diag-up (paint-v (paint-h g r1 c0 c1) c1 r0 r1)))))))Provenance
- Generator
- generators/1238481b674b/generator.py
- Notes and decisions
- generators/1238481b674b/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 907a296f355d90e454437e2c4e74b50d8d40f0541194fff99d3b847b2503a311
- Rule hash
- cbabe9d66374
- Sources
- training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 1238481b674b --count 1 --seed 20261108 --test 1