← eb10171146d5 · eb150c0ba566 →

eb12c70f1032

Measure same-color four-connected object areas, order objects by left edge/top edge/color, and draw their colors as separated bottom-aligned bars with those heights.

countingobjectsoutput_resize

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* ((objs (sort (objects g 0)
                     (lambda (a b)
                       (cond [(< (obj-c1 a) (obj-c1 b)) #t]
                             [(> (obj-c1 a) (obj-c1 b)) #f]
                             [(< (obj-r1 a) (obj-r1 b)) #t]
                             [(> (obj-r1 a) (obj-r1 b)) #f]
                             [else (< (obj-color a) (obj-color b))]))))
         (height (apply max (map obj-size objs)))
         (width (- (* 2 (length objs)) 1)))
    (for/fold ([out (empty-grid height width 0)])
              ([obj (in-list objs)]
               [i (in-naturals 0)])
      (paint-cells out
                   (for/list ([r (in-range (- height (obj-size obj)) height)])
                     (list r (* 2 i)))
                   (obj-color obj)))))

Provenance

Generator
generators/eb12c70f1032/generator.py
Notes and decisions
generators/eb12c70f1032/notes.md
Review label
reviewed_safe
Generator SHA-256
b09866f5d5c01eeb7c2542e55252391f9c95df20735be828f569dd5417af2f1f
Rule hash
548dafbcb9a9
Sources
bank:cedcb02251c0
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate eb12c70f1032 --count 1 --seed 20261108 --test 1