Hi Alex,

my recommendation is that you turn on the URE log and look at the atomese code generated by the URE. This will help you to understand why the URE has a hard time gluing together rules involving executable/evaluatable atomese code.

Set the level to debug, and look for the strings

[DEBUG] [URE] Expanded forward chainer strategy:

as well as

[DEBUG] [URE] With inference tree:

to give you a graphical view of the inference.

(Sorry for the confusing terminology "forward chainer strategy" just means "atomese inference tree").

Nil

On 2/26/20 1:23 PM, Alexander Gabriel wrote:
Hiya everyone!

Here is another problem that I ran into. When a query contains grounded atoms those are ignored (not evaluated) when considering the output.
To demonstrate that I created this small example.


|
(use-modules (opencog)(opencog logger)(opencog exec)(opencog ure))
(define rbs (Concept"foo"))
(ure-set-maximum-iterations rbs 30)




(load-from-path "/home/rasberry/git/pln/opencog/pln/rules/propositional/crisp-conjunction-introduction.scm")
(Member(DefinedSchema"true-conjunction-introduction-2ary-rule")rbs)




(cog-logger-set-level!(cog-ure-logger)"debug")
(cog-logger-set-stdout!(cog-ure-logger)#t)


(define true(Concept"true"))
(define false(Concept"false"))


(define hungry (Concept"hungry"))
(define thirsty (Concept"thirty"))


(define alice (Concept"alice"))




(State(stv 1.01.0)(Listalice hungry)true)
(State(stv 1.01.0)(Listalice thirsty)false)




(define variables (VariableList
(TypedVariable
(Variable"person")
(Type"ConceptNode"))))




;NOTE:Thesereturns (SetLink)asthey should,alice isnt thirsty,the second StateLinkisevaluated correctly.
;(define target (And(State(List(Variable"person")hungry)true)
;(State(List(Variable"person")thirsty)true)))
;(cog-bc rbs target #:vardecl variables)
;(cog-execute!(Getvariables target))




;NOTE:Thisdoesnt evaluate the grounded second state andthat ends up withan erroneous (stv 1.00.0)instead of (stv 0.01.0)which follows fromthe existence of (State(stv 1.01.0)(Listalice thirsty)false).Asa result it returns a result withsecond StateLinkandAndLinkat erroneous (stv 1.00.0).Isthere a way to force the chainer to evaluate already grounded atoms aswell?
(define target (And(State(List(Variable"person")hungry)true)
(State(Listalice thirsty)true)))
(cog-bc rbs target #:vardecl variables)


;Thisreturns (SetLink(ConceptNode"alice")),also ignoring the already grounded StateLink
(cog-execute!(Getvariables target))
|



Shouldn't those grounded atoms be evaluated and considered?

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/5f6d23a9-a847-4fcb-85a2-a822cb1251f2%40googlegroups.com <https://groups.google.com/d/msgid/opencog/5f6d23a9-a847-4fcb-85a2-a822cb1251f2%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/8ea88a71-6ddd-6974-60c4-85bcd8f34f83%40gmail.com.

Reply via email to