Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (deftemplate weather
- (slot type))
- (defrule GetWeatherType
- =>
- (printout t "What is the weather : ")
- (bind ?response (read))
- (assert (type ?response)))
- (defrule Sunny
- (type sunny)
- =>
- (assert (weatherIs sunny))
- (printout t "The weather is nice and sunny!" crlf))
- (defrule Cloudy
- (type cloudy)
- =>
- (assert (weatherIs cloudy))
- (printout t "The weather is cloudy and cold!" crlf))
- (defrule Moody
- (type moody)
- =>
- (assert (weatherIs moody))
- (printout t "The weather is dark and looks like rain is coming!" crlf))
- (reset)
- (run)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement