Thank you very much. Actually my all codes are in here and i couldn't work it. There is a warning. Can you help me to fix this programme?
Warning:[CSTRCPSR4] Cannot redefine deftemplate attributes while it is in use.
ERROR:
(deftemplate MAIN::attributes
[CSTRCPSR1] WARNING: Redefining defrule: r1 +j+j
[CSTRCPSR1] WARNING: Redefining defrule: r2 =j+j+j
[CSTRCPSR1] WARNING: Redefining defrule: r3 =j+j+j
[CSTRCPSR1] WARNING: Redefining defrule: r4 =j+j+j
[CSTRCPSR1] WARNING: Redefining defrule: r5 =j+j+j
FALSE
Codes:
(deftemplate attributes
(slot outlook
(allowed-values sunny overcast rain))
(slot temperature
(allowed-values hot mild cool))
(slot humidity
(allowed-values high normal))
(slot windy
(allowed-values true false))))
(deftemplate response
(slot class))
(defrule r1
(attributes (outlook overcast))
=>
(assert (response (class P))))
(defrule r2
(attributes (outlook sunny))
(and (attributes (humidity high)))
=>
(assert (response (class N))))
(defrule r3
(attributes (outlook sunny))
(and (attributes (humidity normal)))
=>
(assert (response (class P))))
(defrule r4
(attributes (outlook rain))
(and (attributes (windy true)))
=>
(assert (response (class N))))
(defrule r5
(attributes (outlook rain))
(and (attributes (windy false)))
=>
(assert (response (class P))))
(assert (attributes (outlook sunny)
(temperature hot)
(humidity high)
(windy false)))
(assert (attributes (outlook sunny)
(temperature hot)
(humidity high)
(windy true)))
(assert (attributes (outlook overcast)
(temperature hot)
(humidity high)
(windy false)))
(assert (attributes (outlook rain)
(temperature mild)
(humidity high)
(windy false)))
(assert (attributes (outlook rain)
(temperature cool)
(humidity normal)
(windy false)))
(assert (attributes (outlook rain)
(temperature cool)
(humidity normal)
(windy true)))
(assert (attributes (outlook overcast)
(temperature cool)
(humidity normal)
(windy true)))
(assert (attributes (outlook sunny)
(temperature mild)
(humidity high)
(windy false)))
(assert (attributes (outlook sunny)
(temperature cool)
(humidity normal)
(windy false)))
(assert (attributes (outlook rain)
(temperature mild)
(humidity normal)
(windy false)))
(assert (attributes (outlook sunny)
(temperature mild)
(humidity normal)
(windy false)))
(assert (attributes (outlook overcast)
(temperature mild)
(humidity high)
(windy true)))
(assert (attributes (outlook overcast)
(temperature hot)
(humidity normal)
(windy false)))
(assert (attributes (outlook rain)
(temperature mild)
(humidity high)
(windy true)))