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.0 1.0) (List alice hungry) true)
(State (stv 1.0 1.0) (List alice thirsty) false)
(define variables (VariableList
(TypedVariable
(Variable "person")
(Type "ConceptNode"))))
; NOTE: These returns (SetLink ) as they should, alice isnt thirsty, the
second StateLink is evaluated correctly.
; (define target (And (State (List (Variable "person") hungry) true)
; (State (List (Variable "person") thirsty) true)))
; (cog-bc rbs target #:vardecl variables)
; (cog-execute! (Get variables target))
; NOTE: This doesnt evaluate the grounded second state and that ends up with
an erroneous (stv 1.0 0.0) instead of (stv 0.0 1.0) which follows from the
existence of (State (stv 1.0 1.0) (List alice thirsty) false). As a result
it returns a result with second StateLink and AndLink at erroneous (stv 1.0
0.0). Is there a way to force the chainer to evaluate already grounded
atoms as well?
(define target (And (State (List (Variable "person") hungry) true)
(State (List alice thirsty) true)))
(cog-bc rbs target #:vardecl variables)
; This returns (SetLink (ConceptNode "alice")), also ignoring the already
grounded StateLink
(cog-execute! (Get variables 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/opencog/5f6d23a9-a847-4fcb-85a2-a822cb1251f2%40googlegroups.com.
ignoring_grounded_atoms.scm
Description: Binary data
