(deffacts today
(today is Sunday)
(weather is warm) )
Why after this instruction execution, the facts of (wash car) and (chop wood) not added to the base?
(defrule chores
(salience 10)
(today is Sunday)
(weather is warm) =>
(assert (wash car))
(assert (chop wood) ) )
I am sorry for my English:)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
CLIPS>
(deffacts today
(today is Sunday)
(weather is warm))
CLIPS>
(defrule chores
(salience 10)
(today is Sunday)
(weather is warm)
=>
(assert (wash car))
(assert (chop wood)))
CLIPS> (reset)
CLIPS> (run)
CLIPS> (facts)
f-0 (initial-fact)
f-1 (today is Sunday)
f-2 (weather is warm)
For a total of 3 facts.
CLIPS>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Welcome to Help
How to activate did rules?
This my code:
(deffacts today
(today is Sunday)
(weather is warm) )
Why after this instruction execution, the facts of (wash car) and (chop wood) not added to the base?
(defrule chores
(salience 10)
(today is Sunday)
(weather is warm) =>
(assert (wash car))
(assert (chop wood) ) )
I am sorry for my English:)
CLIPS>
(deffacts today
(today is Sunday)
(weather is warm))
CLIPS>
(defrule chores
(salience 10)
(today is Sunday)
(weather is warm)
=>
(assert (wash car))
(assert (chop wood)))
CLIPS> (reset)
CLIPS> (run)
CLIPS> (facts)
f-0 (initial-fact)
f-1 (today is Sunday)
f-2 (weather is warm)
For a total of 3 facts.
CLIPS>
Thanks!!!