GridGlyph is a hybrid symbolic + AI system designed to solve grid-based visual reasoning puzzles (like those in the Abstraction and Reasoning Corpus — ARC). It transforms numeric grids into abstract symbolic representations and learns deterministic transformation rules expressed as sigils in a custom DSL.
Unlike traditional approaches, GridGlyph ensures:
- Multiple puzzle instances of the same underlying rule converge in the latent embedding space
- DSL rules are deterministic, symbolic, and interpretable
- Novel combinations of atomic operations are possible without hallucination
The full system that solves visual pattern puzzles using symbolic abstraction and embeddings.
GridGlyph teaches AI to see transformations structurally:
- Not by raw numeric values
- But by object counts, patterns, repetition, mirroring, rotation
- Using embeddings → DSL predictor → execution → scoring
Encode puzzles into a latent space capturing structural features, forcing multiple representations of the same rule to converge.
- Multiple views per rule: Every puzzle rule is represented by all available input/output examples, possibly with symbolic perturbations (shuffled numbers, reordered objects) to create diverse variants.
- Convergent embedding: Feeding all variants into the embedding encoder forces latent vectors of the same rule to align, independent of numeric ordering.
- DSL prediction: A compact model predicts the DSL sequence of sigils directly from the embedding. Since embeddings converge, the model produces a unique, deterministic symbolic output for each underlying transformation.
Benefits:
- Deterministic, interpretable rule output
- No hallucination
- Supports novel recombinations of atomic operations
- Simplified, compact model training
Transformation rules expressed as symbolic operations (DSL), not Python functions.
A sigil is a symbolic character or sequence representing an atomic transformation in the GridGlyph DSL.
Examples of atomic sigils:
⌂→ reference to input gridⳀ→ identity (no change)↻→ rotate grid clockwise↔→ horizontal flip↕→ vertical flip→→ apply operation to a row↓→ apply operation to a column
Combining sigils:
Sigils can be nested or sequenced to form complex transformation programs.
Example DSL Sigil Sequence:
T = [→(⌂, ◨(III)), ↔(R0), ↻(I)]
→(⌂, ◨(III))→ apply horizontal repeat 3 times to row of input grid↔(R0)→ flip row 0 horizontally↻(I)→ rotate entire input grid clockwise
Why sigils:
- Encodes transformations in a deterministic, interpretable, symbolic way
- Executable directly by the
DSLExecutor - Supports recombination and extension with atomic DSL operations
- Input Puzzle: Numeric input/output grid pairs
- Generate Variants: Create several puzzle instances for the same rule (object shuffle, symbol remapping, reordered rows/columns)
- Embedding Encoder: Map grids to latent space, forcing embeddings of same-rule variants to cluster
- DSL Predictor: Train a compact model to output sigil sequences from embeddings
- Execute Sigil: Run predicted symbolic transformations on input grids
- Score: Compare predicted output vs expected results
- Optional Feedback Loop: Retry or augment if outputs are inconsistent
- Embedding alignment ensures deterministic rule outputs
- Multiple puzzle variants improve generalization
- DSL-based execution eliminates hallucination
- Atomic operations + recombination allow solving unseen puzzles
- Deterministic, interpretable transformation rules
- Can handle many variations of the same underlying rule
- Compact models, less compute than full LLMs
- Supports recombination of atomic transformations for unseen puzzles
- Embeddings encourage generalization and rule alignment
- Start with atomic sigils, validate manually
- Generate multiple variants per rule for embedding convergence
- Train embeddings and DSL predictor jointly
- Track rule execution and scores to ensure convergence