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.

Reply via email to