Am Montag, 2. März 2020 07:22:23 UTC schrieb Nil:
>
> 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. 
>

So what happens is the pattern matcher fills the blanks according to what 
it can do and the chainer than reports the TV of that result. Yes, that 
doesn't scale to what I intend to do.
 

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

Oh, that wasn't obvious to me. But it explains many of the problems I had 
with truth value assignment I guess.
 

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

What to do you mean? Create a new Atom type as a subtype of ConceptNode? I 
haven't seen a way on how to do that..
TypedVariables I already have as you can see.

 

>
> > 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). 
>
>
 Which Variable declaration do you mean? The GetLink's? The 
BackwardChainer's?

If I exclude it from both I get:
terminate called after throwing an instance of 
'opencog::InvalidParamException'
  what():  The variable (VariableNode "person2") does not appear (unquoted) 
in any clause! 
(/home/rasberry/git/atomspace/opencog/atoms/pattern/PatternLink.cc:508)
Aborted (core dumped)

If I exclude it from the GetLink I get:
Results:
(SetLink (SetLink (ListLink (ConceptNode "alice") (ConceptNode "place1") 
(ConceptNode "place3")) (ListLink (ConceptNode "alice") (ConceptNode 
"place1") (ConceptNode "place2"))))

Details:
--------------------------
Result Truth: (stv 1.000000 0.000000)
Result:
(ListLink (ConceptNode "alice") (ConceptNode "place1") (ConceptNode 
"place3"))
------------------------

Result Truth: (stv 1.000000 0.000000)
Result:
(ListLink (ConceptNode "alice") (ConceptNode "place1") (ConceptNode 
"place2"))


Which is wrong as it should only report place3 since there is a person 
present at place2.

If I exclude it only from the chainer I get:
Results:
(SetLink)

Which is wrong as it should report place3 where there is no person present.


Best,
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/opencog/f7de287a-e2db-43d6-90c4-01649842f08d%40googlegroups.com.

Reply via email to