← d6607fc42bcc · d68b3843203e →

d68754fb0d84

A 0-background 11..20 x 13..22 grid contains one connected color-2 template of 4..7 cells and one to four control pairs. Each pair is a code 1..8 immediately left of a color-9 anchor. The output is otherwise empty and stamps the corresponding identity/rotation/reflection of the normalized template in color 3 at each anchor.

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 ((dummy 0))
    (define template (first (filter (lambda (o) (= (obj-color o) 2)) (objects g 0))))
    (define (renorm cells) (normalize-cells cells))
    (define (rot90 cells h w) (list (renorm (map (lambda (p) (list (second p) (- h 1 (first p)))) cells)) w h))
    (define (rot180 cells h w) (list (renorm (map (lambda (p) (list (- h 1 (first p)) (- w 1 (second p)))) cells)) h w))
    (define (rot270 cells h w) (list (renorm (map (lambda (p) (list (- w 1 (second p)) (first p))) cells)) w h))
    (define (flip-h cells h w) (list (renorm (map (lambda (p) (list (first p) (- w 1 (second p)))) cells)) h w))
    (define (flip-v cells h w) (list (renorm (map (lambda (p) (list (- h 1 (first p)) (second p))) cells)) h w))
    (define (flip-d cells h w) (list (renorm (map (lambda (p) (list (second p) (first p))) cells)) w h))
    (define (flip-a cells h w) (list (renorm (map (lambda (p) (list (- w 1 (second p)) (- h 1 (first p)))) cells)) w h))
    (define base (normalize-cells (obj-cells template)))
    (define (apply-code code)
      (cond [(= code 1) (list base (obj-h template) (obj-w template))]
            [(= code 2) (rot90 base (obj-h template) (obj-w template))]
            [(= code 3) (rot180 base (obj-h template) (obj-w template))]
            [(= code 4) (rot270 base (obj-h template) (obj-w template))]
            [(= code 5) (flip-h base (obj-h template) (obj-w template))]
            [(= code 6) (flip-v base (obj-h template) (obj-w template))]
            [(= code 7) (flip-d base (obj-h template) (obj-w template))]
            [else (flip-a base (obj-h template) (obj-w template))]))
    (foldl (lambda (anchor out)
             (let* ((code (safe-at g (first anchor) (- (second anchor) 1) 0))
                    (shape (first (apply-code code)))
                    (placed (map (lambda (p) (list (+ (first anchor) (first p)) (+ (second anchor) (second p)))) shape)))
               (paint-cells out placed 3)))
           (empty-grid (rows g) (cols g) 0)
           (find-color g 9))))

Provenance

Generator
generators/d68754fb0d84/generator.py
Notes and decisions
generators/d68754fb0d84/notes.md
Review label
reviewed_safe
Generator SHA-256
5fb91765ac44f745336ffb07cfe6673bf53a2064bf338eb9dcb786d9c025cc31
Rule hash
edea3d411dc3
Sources
bank:54d03287ae93
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate d68754fb0d84 --count 1 --seed 20261108 --test 1