michaelhodel / arc-dsl

Domain Specific Language for the Abstraction and Reasoning Corpus
MIT License
184 stars 38 forks source link

Fix solve e40b9e2f #10

Open AmziJeffs opened 1 week ago

AmziJeffs commented 1 week ago

Current solver has an error in line 3933 x10 = argmax(x9, x5). The code attempts to find the translate of maximum overlap with original object, but the function x5 simply computes the intersection, not the size of the intersection.

The second overlap computation in the solver is correct, using x14 = compose(size, x5) to find the argmax of size. The simplest fix is to just define x14 earlier, and use it in the first argmax instead of x5. My fix does this, and renames the variables sequentially.