← 155cf6b30713 · 156bae9e7b79 →

1569ecfa4ff1

A zero-background grid has one color-8 pivot and three or four cells of one other color. Rotate each foreground cell 90 degrees clockwise around the pivot, preserve its color, keep the pivot fixed, and clear the old foreground positions.

coordinate transformpivot detectionrigid rotation

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!
  ;; The unique 8 cell is the fixed pivot; the task grammar has one other color.
  (let* ((pivot (first (find-color g 8)))
         (cells (filter-cells g
                  (lambda (r c v) (and (not (= v 0)) (not (= v 8))))))
         (color (at g (first (first cells)) (second (first cells)))))
    ;; A clockwise quarter-turn maps the pivot-relative vector (dr, dc) to (dc, -dr).
    (define (rotate-one p)
      (let ((dr (- (first p) (first pivot)))
            (dc (- (second p) (second pivot))))
        (list (+ (first pivot) dc) (- (second pivot) dr))))
    ;; Rebuild the scene from background so the old foreground positions are cleared.
    (paint-cells
      (paint-cells (empty-grid (rows g) (cols g) 0) (list pivot) 8)
      (map rotate-one cells)
      color)))

Provenance

Generator
generators/1569ecfa4ff1/generator.py
Notes and decisions
generators/1569ecfa4ff1/notes.md
Review label
reviewed_safe
Generator SHA-256
7dd5ccd40016e77f77ee4af64b846662449152f1357dcfbd61f8991e7f2a1e5a
Rule hash
094a5ceb0473
Sources
bank:be1bc1d91387
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 1569ecfa4ff1 --count 1 --seed 20261108 --test 1