Herb-AI / HerbBenchmarks.jl

Benchmarks and problems for Herb.jl
https://herb-ai.github.io/
MIT License
1 stars 0 forks source link

ARC grammar: overlapping values `Color` and `Pos` #46

Open pwochner opened 3 months ago

pwochner commented 3 months ago
# grammar.jl
Color = |(0:9)
Pos = |(1:30)

When expanded, the grammar has a rule for each value for Color (from 0 to 9), but for Pos, the grammar only covers values 10 to 30.

We could use a tuple for Pos, but that would make the grammar very big. Can we think of a elegant solution for this?

THinnerichs commented 2 months ago

As discussed previously, I see multiple solutions:

  1. Add units to Color: Comparisons + operations would still work.
  2. Do something ugly like
    Color = Int(1) | ...

    As the expression differs, this should work.