Tea

  • October 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Tea as PDF for free.

More details

  • Words: 178
  • Pages: 1
(deftemplate tea (multislot category (type SYMBOL) ) (slot test (type SYMBOL)) (slot ingredient (type SYMBOL) (default sugar)) (slot recipe (type SYMBOL) ) (deffacts tea_categories (tea (categories black) (test bitter) (ingredients water,sugar) (recipe ice tea latte) (tea (categories green) (test sweet) (ingredients milk,sugar) (recipe organic green tea with ginger) (tea (categories oolong originate ) (test sweet) (ingredients milk,sugar) (recipe iced caramel cream) (tea (categories herbal ) (test bitter) (ingredients water,sugar) (recipe nerada shearer's fruit tea cake) ) (defrule ask-test (declare (salience 100)) (initial-fact) => (printout t "Please enter the tea characteristics:" crlf) (printout t "recipe (ice tea latte,organic green tea with ginger,iced carmel cream,nerada shearer's fruit tea cake) :") (bind ?ans1 (read)) (printout t crlf "ingredient (sugar,water,milk) :") (bind ?ans2 (read)) (printout t crlf "test (bitter or sweet) :") (bind ?ans3 (read)) (assert (tea (category users) (recipe ?ans1) (ingredients ?ans2) (test ? ans3))) ) (defrule category (declare (salience 10)) (tea (category users) (test ?t) (ingredients ?i) (recipe ?r)) (tea (category ?c&:(neq ?c users))(test ?t) (ingredients ?i) (recipe ?r)) => (printout t "You've got a " ?c crlf) (halt) )

Related Documents

Tea
July 2020 37
Tea
May 2020 38
Tea
November 2019 49
Tea
October 2019 54
Tea
June 2020 24
Tea
May 2020 30