Open sto0pkid opened 1 year ago
EYE produces all expected results
In the EulerJS repo,
Failed test is here: https://github.com/sto0pkid/EulerJS/blob/main/eulerjs/examples/failed_test.js
It is the same one we mentioned in the chat logs, and it fails in the expected way. In the chat logs it was mentioned that EYE also failed on the same test but I don't currently have that version of EYE to test. In any case, this may be a positive since it demonstrates that the euler.js algorithm was wrong, as we expected, and that there's some "simple" fix in EYE which also doesn't produce the complexity explosion.
The discovery of this divergence was one of the big roadblocks we ran into. I've recovered the following insights from old chat logs, but have not recently reproduced any of these experiments or reviewed these pieces of each codebase in enough detail to be currently confident in the accuracy of the statements:
There were apparently a couple different places of divergences:
Unification method in ep check
Ep-check timing
Search strategy
"f != false" vs. "f != null" bug
The following example should apparently demonstrate the difference in result-set semantics between the method we followed with univar and the method followed by euler.js:
should include
while Euler only gets
The example was apparently crafted with the constraints: "so we need an example where every search-path that leads to some result requires at least 2 recursive calls of a rule, and for some n > 1, it fails the ep-check on the nth recursive call along that search-path, and ofc it must be ep-checks that univar wouldnt fail"
My conclusion was that the divergence in result-sets was entirely due to the difference in unification method used in the ep-check, and that the other differences did not have any effect on result-sets.
The example when run with a modified euler.js that corrected the unification method found all 4 results, but took 16 million steps to finish, taking hours to run, crashing browsers, etc... It ran for so long that the default assumption was that it was an infinite loop and the alternative algorithm must have been wrong. But then it did terminate, with all the expected results, whereas euler.js failed to find a result that it seemed like it should have "obviously" gotten. "dmiles: thats totally nut that eye/jos/euler is only giving three answers"
We never really reached a conclusion about what to do about this situation. The purpose of this issue is to reunderstand this whole situation and make a determination about where to go from here.