opencog/ure

Forward chainer is not stable against library changes.

linas opened this issue · 3 comments

linas commented

The ForewardChainerUTest sometimes passes, and sometimes fails, depending on how the AtomSpace has been built, and depending on the random number generator. Changing the initial random see at line 111 causes the unit test to pass/fail randomly. In particular, the test_negation_conflict is the most sensitive to this.

// XXX FIXME. This unit test is unstable with respect to
// perturbations in the code base. In particular,
// test_negation_conflict sometimes passes, and sometimes fails,
// depending on how the AtomSpace has been compiled. The test
// failure can be fixed by changing the seed value here, trying
// different seeds until one finds one that allows the unit tests
// to pass. Currently, a seed of 3 works for me. A seed of 0 used
// to work, but doesn't any longer.
randGen().seed(3);

Needless to say, this comes as an unhappy surprise. I lost two hours tracking this down.

linas commented

@ngeiswei the situation is getting worse -- I am no longer able to find any random seed that allows this unit test to pass. I am disabling it, for now.

Wrapping a PresentLink around the non-virtual clauses fixes the problem. However it probably exposes a bug in the pattern matcher, so I'm gonna try to hunt that first.

linas commented

Yes, opencog/atomspace#2934 fixes this bug.

I will re-enable the test, with the hunt for the random seed. You might want to rip that out.