Hi Alex, Vitaly,

Alex, please set the level of the ure logger to debug and attach the log file here.

Vitaly, please tell Alex how to set the ure logger level if he doesn't know how. Also how can we find documentation about the Python API of the URE (I probably should learn it as well)?

Thanks,
Nil

On 1/11/20 12:50 AM, Alexander Gabriel wrote:


Am Freitag, 10. Januar 2020 22:44:45 UTC schrieb linas:

    I'm not sure what to make of the email below. By "query", do you
mean "run cog-execute! on a BindLink"?

I'm running this:

|
     queries = []

        # WARN: if I add this to the queries it adds the links to the atomspace (as it should I guess)         # and proceeds to return the results for the just added links, truth values differ over distances


         queries.append(StateLink(
             ConceptNode(config.robot_name),
             VariableNode("origin")))

         queries.append(StateLink(
             ConceptNode(config.picker_name),
             VariableNode("destination")))

         queries.append(StateLink(
            ListLink(VariableNode("picker"), PredicateNode("seen_picking")),
             ConceptNode("FALSE")))

         queries.append(StateLink(
             ListLink(VariableNode("picker"), PredicateNode("has_crate")),
             ConceptNode("FALSE")))

         queries.append(
             EvaluationLink(
                 PredicateNode("linked"),
                 ListLink(
                     ConceptNode("WayPoint{:03d}".format(config.robot_pos)),
ConceptNode("WayPoint{:03d}".format(config.picker_pos)))))


        # this returns results only for predefined links, but even there the truth value has zero confidence
         queries.append(
                 AndLink(
                     StateLink(
                         ConceptNode(config.robot_name),
                         VariableNode("origin")),
                     StateLink(
                         ConceptNode(config.picker_name),
                         VariableNode("destination")),
                     StateLink(
                        ListLink(VariableNode("picker"), PredicateNode("seen_picking")),
                         ConceptNode("FALSE")),
                     StateLink(
                        ListLink(VariableNode("picker"), PredicateNode("has_crate")),
                         ConceptNode("FALSE")),
                     EvaluationLink(
                         PredicateNode("linked"),
                         ListLink(
                             VariableNode("origin"),
                             VariableNode("destination")))))

         for query in queries:
             print("Query: {:}\n".format(query))
             chainer = BackwardChainer(atomspace,
                               rbs,
                               query)
             chainer.do_chain()
             results = chainer.get_results()
             print("Result {:}".format(results))
             try:
                 print("Truth: {:}".format(results.get_out()[0].tv))
             except:
                 pass
             print("\n\n")
|

here is a link to the rest of the code <https://gist.github.com/alexander-gabriel/59f06eb3d0f2ffa02b161f9dbca1a12c> which defines the contents of the atomspace.

--
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+unsubscr...@googlegroups.com <mailto:opencog+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/7f1d2406-3902-4677-bf35-ebea7d64a0e8%40googlegroups.com <https://groups.google.com/d/msgid/opencog/7f1d2406-3902-4677-bf35-ebea7d64a0e8%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 opencog+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/opencog/cada8718-7ff0-6e9d-1180-69aca9cde37f%40gmail.com.

Reply via email to