On 3/2/20 11:27 AM, Alexander Gabriel wrote:
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.

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.


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.

In case there's some confusion to clear up, maybe read the following

https://wiki.opencog.org/w/Unified_rule_engine
https://wiki.opencog.org/w/URE_Configuration

and go through some examples here

https://github.com/opencog/ure/tree/master//examples/ure

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

Unfortunately no example is provided in python.

Nil



     > 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] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/f7de287a-e2db-43d6-90c4-01649842f08d%40googlegroups.com <https://groups.google.com/d/msgid/opencog/f7de287a-e2db-43d6-90c4-01649842f08d%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/faa071cd-17d2-13e2-b100-fac461a94335%40gmail.com.

Reply via email to