Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward chainer is not stable against library changes. #120

Closed
linas opened this issue Nov 11, 2021 · 3 comments
Closed

Forward chainer is not stable against library changes. #120

linas opened this issue Nov 11, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@linas
Copy link
Member

linas commented Nov 11, 2021

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 linas added the bug Something isn't working label Nov 11, 2021
linas added a commit that referenced this issue Nov 24, 2021
@linas
Copy link
Member Author

linas commented Apr 13, 2022

@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
Copy link
Member

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
Copy link
Member Author

linas commented Apr 21, 2022

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.

@linas linas closed this as completed Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants