← 26872d42d87a · 2692a3e47a66 →

268b0e9a75b4

Crop the first row-major color having one object, or fall back to the largest object of the highest color when every color repeats.

component counting by colorcroppingobject selection

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 objs (objects g 0))
    (define colors (remove-duplicates (map third (filter (lambda (cell) (not (= (third cell) 0))) (grid-cells g)))))
    (define chosen
      (let ((hit
              (find-first
                (lambda (color) (= (length (filter (lambda (obj) (= (obj-color obj) color)) objs)) 1))
                colors)))
        (if hit
            (first (filter (lambda (obj) (= (obj-color obj) hit)) objs))
            (first (sort objs
                         (lambda (a b)
                           (if (= (obj-color a) (obj-color b))
                               (> (obj-size a) (obj-size b))
                               (> (obj-color a) (obj-color b)))))))))
    (subgrid g (obj-r1 chosen) (obj-c1 chosen) (obj-r2 chosen) (obj-c2 chosen))))

Provenance

Generator
generators/268b0e9a75b4/generator.py
Notes and decisions
generators/268b0e9a75b4/notes.md
Review label
reviewed_safe
Generator SHA-256
d2c9358d83f264d38d6c7051dfa371f42fce6f73256a77c85149a329ebf89943
Rule hash
210dc0194f51
Sources
bank:ba76b91f26f9
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 268b0e9a75b4 --count 1 --seed 20261108 --test 1