Yeah, beats me. I don't know how the chainer works. Nil will know more. --linas
On Fri, Jan 10, 2020 at 4:50 PM Alexander Gabriel <[email protected]> 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 [email protected]. > 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> > . > -- cassette tapes - analog TV - film cameras - you -- 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/CAHrUA355EUsz9vcvJ4QVtq8p8-dU__M3v0hmTCHafMxWNKm-pQ%40mail.gmail.com.
