-
Notifications
You must be signed in to change notification settings - Fork 721
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
Use AndLink instead of SequentialAndLink for the psi-rules #2976
Conversation
Hmm. Well, sequentialAnd is ordered, while And is not ordered, so potentially you cannot tell the first from the second. Is an AndlInk actually needed here? Maybe just a plain-old OrderedLink would be enough? |
I mean, it was throwing an error because there;'s a ConceptNode in the SequntialAnd .. however, a ConceptLink in a regular And is also very illegal... |
ConceptNode in a regular And should not be illegal. If it is then we need do define an And connector for Concept, as opposed to overloading AndLink for both concepts and predicates. |
Regarding using
or something of that sort. It is interesting to note that the hypothetical actualization of the action is in someway part of a greater context, the whole antecedent of the rule. But again, since PLN isn't used yet, using the order is still OK for now. |
I think we no longer need to use SeqAnd for "context" and "action". It was there because the order was used to distinguish the context from action. But as Nil said that's not good, also getting context/action/goal of a psi-rule is handled differently now: https://github.com/opencog/opencog/blob/master/opencog/openpsi/OpenPsiRules.cc#L115-L142 |
OK, I have two issues:
|
The current code-base uses AndLink for all sorts of things. I'm arguing that it could be, should be tightened up. Or something. Its OK to sometimes leave things loose and poorly defined; but sometimes its better not to... |
This reminds me when doing pattern matching, some of the stuffs may be "patterns" that should be looked for, and some may be "evaluatable" or "executable", and they are all under an BTW, just to be clear, this (Implication
(And ; <-- This one
context
action
)
goal
) So in the example you gave, it will be written: (Implication
(And
(SequentialAnd
; someone entered the room
; a little while later a second person entered the room
)
action
)
goal
) And I agree it makes sense to use |
Yeah, the pattern matcher uses AndLink. The long-term plan is to use PresentLink and AbsentLink to indicate what should be looked for. For now, having only implicit PresentLink seems OK, and does not lead to confusion. Recall that, in the begining, long ago, BindLink was called ImplicationLink. But then we got confused about variable binding and changed the name to BindLink which wrapped around an Implication. And then Nil removed the Implication because it did not seem to be needed. And then Ben started talking about openpsi as a different kind of implication. And then the idea of variable scoping became clear, so ScopeLink got invented when that became clear. And then Nil Invented ImplicationScopeLink, so we kind-of went in a full circle back to the beginning, where we started. Its OK, its confusing. |
I agree about |
An additional comment about openpsi rule format is that they should very likely be |
As a reminder there was the following discussion with regards to openpsi representation, #2899 (comment) |
This should fix both OpenPsiImplicatorUTest and OpenPsiSCMUTest.