I'm not sure what to make of the email below. By "query", do you mean "run cog-execute! on a BindLink"? if so, then you are only running the pattern matcher, and not the URE. The pattern matcher never sets or changes truth values, so you describe an impossible situation.
So, I guess you are running the URE/PLN, then?! Which implies that some rule somewhere got in there and altered the TV. I don't know of any particular way of finding out who touched it. Is there a way to get a list of the rules that got triggered? --linas On Fri, Jan 10, 2020 at 4:15 PM Alexander Gabriel <[email protected]> wrote: > Hi Linas, > > >> First Alex: As Nil already noted, the results you posted look reasonable, >> except that the truth value was insane, given the code snippets you posted. >> I see two possibilities: >> -- in addition to running your rule, some other rules are running, and >> generating a different TV. Maybe some other rules you created and forgot to >> delete? Maybe some other rules in PLN? >> -- there is a bug in python, causing a bogus TV to be set. Seems unlikely >> but always possible. >> > > I dug a bit deeper into the truth value problem, by running a series of > queries with all inference rules (both pln and mine) disabled, for a case > where there should be no need for inference (picker and robot are on > adjacent waypoints and those are predefined as linked). > > Query: (StateLink (ConceptNode "Robot01") (VariableNode "origin")) > > Result (SetLink (StateLink (ConceptNode "Robot01") (ConceptNode > "WayPoint001") )) > Truth: (stv 1.000000 1.000000) > > > > Query: (StateLink (ConceptNode "Picker01") (VariableNode "destination")) > > Result (SetLink (StateLink (ConceptNode "Picker01") (ConceptNode > "WayPoint002") )) > Truth: (stv 1.000000 1.000000) > > > > Query: (StateLink (ListLink (VariableNode "picker") > (PredicateNode "seen_picking") ) (ConceptNode "FALSE")) > > Result (SetLink (StateLink (ListLink (ConceptNode "Picker01") > (PredicateNode "seen_picking") ) (ConceptNode "FALSE") )) > Truth: (stv 1.000000 1.000000) > > > > Query: (StateLink (ListLink (VariableNode "picker") > (PredicateNode "has_crate") ) (ConceptNode "FALSE")) > > Result (SetLink (StateLink (ListLink (ConceptNode "Picker01") > (PredicateNode "has_crate") ) (ConceptNode "FALSE") )) > Truth: (stv 1.000000 1.000000) > > > > Query: (EvaluationLink (PredicateNode "linked") (ListLink > (ConceptNode "WayPoint001") (ConceptNode "WayPoint002") )) > > Result (SetLink (EvaluationLink (PredicateNode "linked") > (ListLink (ConceptNode "WayPoint001") (ConceptNode > "WayPoint002") ) )) > Truth: (stv 1.000000 1.000000) > > > > Query: (AndLink (EvaluationLink (PredicateNode "linked") > (ListLink (VariableNode "origin") (VariableNode "destination") > ) ) (StateLink (ListLink (VariableNode "picker") > (PredicateNode "has_crate") ) (ConceptNode "FALSE") ) (StateLink > (ListLink (VariableNode "picker") (PredicateNode > "seen_picking") ) (ConceptNode "FALSE") ) (StateLink > (ConceptNode "Robot01") (VariableNode "origin") ) (StateLink > (ConceptNode "Picker01") (VariableNode "destination") )) > > Result (SetLink (AndLink (StateLink (ConceptNode "Robot01") > (ConceptNode "WayPoint001") ) (StateLink (ListLink > (ConceptNode "Picker01") (PredicateNode "seen_picking") ) > (ConceptNode "FALSE") ) (StateLink (ConceptNode "Picker01") > (ConceptNode "WayPoint002") ) (EvaluationLink (PredicateNode > "linked") (ListLink (ConceptNode "WayPoint001") > (ConceptNode "WayPoint002") ) ) (StateLink (ListLink > (ConceptNode "Picker01") (PredicateNode "has_crate") ) > (ConceptNode "FALSE") ) )) > Truth: (stv 1.000000 0.000000) > > > the only query not returning the expected truth value is the last one, > which consists of an AndLink, linking the previous ones (with on little > difference: it uses VariableNodes instead of ConceptNodes within the > EvaluationLink). An AndLink omitting that EvaluationLink also returns the > expected 1,1 truth value. > Maybe my error lies in how I use the EvaluationLink? > > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/opencog/a11daf77-20d0-43be-a15d-d49fd86ec4af%40googlegroups.com > <https://groups.google.com/d/msgid/opencog/a11daf77-20d0-43be-a15d-d49fd86ec4af%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/CAHrUA36bAWOP8XeAzO_NpBE6p45hA9U5uW0Cv4GSSrJK_ajckg%40mail.gmail.com.
