opencog / ure

Unified Rule Engine. Graph rewriting system for the AtomSpace. Used as reasoning engine for OpenCog.
Other
54 stars 31 forks source link

Forward chainer is not stable against library changes. #120

Closed linas closed 2 years ago

linas commented 3 years ago

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.

https://github.com/opencog/ure/blob/a88b4df31b9981d15c90c7df9d491ecd3b3d99cf/tests/ure/forwardchainer/ForwardChainerUTest.cxxtest#L103-L111

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

linas commented 2 years ago

@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.

ngeiswei commented 2 years ago

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 2 years ago

Yes, https://github.com/opencog/atomspace/pull/2934 fixes this bug.

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