Hi Alex,

On 3/2/20 4:55 AM, Alexander Gabriel wrote:
When I run the backward chainer with this query:
|
(GetLink
   (VariableList
     (TypedVariableLink (VariableNode "picker") (TypeNode "ConceptNode"))
     (TypedVariableLink (VariableNode "human") (TypeNode "ConceptNode"))
     (TypedVariableLink (VariableNode "place1") (TypeNode "ConceptNode"))
     (TypedVariableLink (VariableNode "origin") (TypeNode "ConceptNode"))
    (TypedVariableLink (VariableNode "destination") (TypeNode "ConceptNode")))
   (AndLink
     (InheritanceLink (VariableNode "picker") (VariableNode "human"))
    (StateLink (ListLink (VariableNode "picker") (PredicateNode "called robot")) (ConceptNode "FALSE"))     (StateLink (ListLink (VariableNode "picker") (PredicateNode "seen_picking")) (ConceptNode "FALSE"))     (StateLink (ListLink (VariableNode "picker") (PredicateNode "movement")) (ConceptNode "APPROACHING"))
     (StateLink (VariableNode "picker") (VariableNode "place1"))
    (EvaluationLink (PredicateNode "leads_to") (ListLink (VariableNode "place1") (VariableNode "origin")))
     (StateLink (ConceptNode "Thorvald_001") (VariableNode "origin"))
    (EvaluationLink (PredicateNode "leads_to") (ListLink (VariableNode "origin") (VariableNode "destination")))
   )
)

If that get link is the target of your query, then you're merely asking the backward chainer to infer the TV of a constant term (that get link). I doubt that is what you are after.

|

It takes only 0.004 seconds on my database.

Yeah, it likely doesn't find any rule that it can apply on that target, and thus abort after all failing unifications.


But if I run the same query without the encompassing GetLink
|
   (AndLink
     (InheritanceLink (VariableNode "picker") (VariableNode "human"))
    (StateLink (ListLink (VariableNode "picker") (PredicateNode "called robot")) (ConceptNode "FALSE"))     (StateLink (ListLink (VariableNode "picker") (PredicateNode "seen_picking")) (ConceptNode "FALSE"))     (StateLink (ListLink (VariableNode "picker") (PredicateNode "movement")) (ConceptNode "APPROACHING"))
     (StateLink (VariableNode "picker") (VariableNode "place1"))
    (EvaluationLink (PredicateNode "leads_to") (ListLink (VariableNode "place1") (VariableNode "origin")))
     (StateLink (ConceptNode "Thorvald_001") (VariableNode "origin"))
    (EvaluationLink (PredicateNode "leads_to") (ListLink (VariableNode "origin") (VariableNode "destination")))
   )
|

Ah, it's a completely different query, one where the backward chainer tries to find assignments of the free variables of a closed term.

Anyway, it seems I have to forgo the use of the GetLink because I have to add another condition
|
(AbsentLink (StateLink (VariableNode "person2"), (VariableNode "destination")))
|

The backward chainer does not support as of today targets containing virtual links. I have some ideas of how to at least partially support it but it hasn't been implemented yet.

The 5 seconds are way too long for my application though.

If you add a type declaration (I believe the python bindings allow you that), it should speed up the reasoning as well.

Is there a way to exclude a variable from being considered by the GetLink? I tried to exclude it from the GetLink's VariableList, but that didn't work.

If such variable is not in the variable declaration it will be treated as constant (if that's what you want).

Nil


Thanks for your help!

Best regards,
Alex

--
You received this message because you are subscribed to the Google Groups "opencog" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/41de6c82-bf49-4dc0-bc3f-9773ac3973ad%40googlegroups.com <https://groups.google.com/d/msgid/opencog/41de6c82-bf49-4dc0-bc3f-9773ac3973ad%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups 
"opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/opencog/2ff173e3-686d-0202-cb02-3513394acee3%40gmail.com.

Reply via email to