(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"))) )) (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"))) )(AbsentLink (StateLink (VariableNode "person2"), (VariableNode "destination")))
My intuition is that this is a bug. I assume we have to solve whatever is in the outgoing set of the GetLink in order to return the result for the GetLink and so the outgoing set can be computed in less than 0.004 seconds.
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")))to make sure that there is nobody at the destination and the waypoint is free. And adding this only works if I don't use the wrapping GetLink, my guess is that adding the GetLink doesn't give any results because there is no grounding for (VariableNode "person2") if there is nobody at the waypoint.
The 5 seconds are way too long for my application though.
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.
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 opencog+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/41de6c82-bf49-4dc0-bc3f-9773ac3973ad%40googlegroups.com.
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.
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).
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)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"))
Results:(SetLink)No, it typically doesn't need to execute the link it is doing inference
on, rather it runs inference trees constructed from inference rules that
produces the target, including updating its TV. Whether this is fast or
slow depends on the inference trees, not so much the target.
> If you add a type declaration (I believe the python bindings allow you
> that), it should speed up the reasoning as well.
for instance the frog example show an example of variable declaration in
a backward chainer query
https://github.com/opencog/ure/tree/master/examples/ure/frog#backward-chainer
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 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)This is a bug -- an exception should never end with a core dump; the system should just report the exception and return to the python command line (or, alternately, run the python exception handler, if any) . Could you please report this as a bug?
So what happens is the pattern matcher fills the blanks according to what it
Yes, that doesn't scale to what I intend to do.
Ah, it's a completely different query, one where the backward chainer
tries to find assignments of the free variables of a closed term.
--
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 opencog+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/1f0e3123-3108-4fbc-b770-4fc4289ee2f2%40googlegroups.com.
Yes, that doesn't scale to what I intend to do.I'd like to know why you think that. (what you are trying to do). I'm interested in understanding and solving scaling problems.
Ah, it's a completely different query, one where the backward chainer
tries to find assignments of the free variables of a closed term.
This was unclear to me, so let me clarify, (... and Nil should correct me where I'm wrong.)Suppose that the pattern matcher finds zero solutions to the original query -- there is no combination of human/picker/place1/origin/destination in the *current* atomspace that satisfies that pattern. In this case, the backward chainer then examines the set of rules that it has, to determine, if possible, whether there is a sequence of deductions (a sequence of rule applications) that provide suitable Atoms that allow your pattern to be satisfied. For example, the current AtomSpace might not contain any humans at all, but perhaps there is a way to infer that someone is human. Or a better example: there is no (Evaluation (Predicate "leads to") origin destination) but perhaps the backward chainer can find a sequence of multiple steps that lead from origin to destination -- it can find a path -- that eventually leads to a satisfaction of all of your terms.The problem with path-finding, is, of course, that it's a hard problem: there can be a combinatorial explosion, and thus an explosion of CPU time. There are algorithms that, for example, know all about 2D space, and make use of 2D geometry to find a good path. The backward chainer has no clue that it's exploring a 2D space, so it's search for a path is a bit more blind. Perhaps there's a way of making it clever, e.g. taking the A*-search rules and turning them into a PLN formula, and maybe that would work... but this discussion is not yet at this level.
--
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 opencog+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/21007978-a855-45b0-9c52-b0dab0c023e3%40googlegroups.com.
Ah!
-- So, if you just need a motion planner that works (as opposed to messing with the theory of it) then, as a practical solution, I would recommend just grabbing something off the shelf and wiring it in, ad hoc.
Every time an inference tree is created it is executed, and results are
collected, and returned the user at the end.
To unsubscribe from this group and stop receiving emails from it, send an email to opencog+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/0d653f73-d85a-b01a-226e-3e4daf14aa98%40gmail.com.