Name:

 

Instructions:

    Answer all questions (except hands-on CLIPS) in the answer sheet provided. On Multiple Choice, choose the ONE BEST ANSWER.

    Remember to put the letter of your test form on the top of your answer sheet.

    Hand in Test, Answer Sheet, and Help Sheets, all with your name.

 

 

Multiple Choice

(3 points each)

 

1.       Which of the following is true about Newell and Simon’s General Problem Solver?

A)      demonstrated that human level expertise could be accomplished using general operations

B)      demonstrated the value of machine learning for intelligent systems

C)      helped mainly as an example of what not to do

D)      all of the above

E)      none of the above

 

2.       Evolutionary computing

A)      is inspired by the “survival of the fittest” ideas of evolution

B)      is inspired by the inheritance of genes of genetics

C)      is frequently successful for complex optimization problems

D)      all of the above

E)      none of the above

 

3.       Which of the following is true with respect to intelligent systems technologies?

A)      Fuzzy logic is commonly a good approach for optimization problems

B)      Evolutionary computing methods are frequently a good approach for chemical process control

C)      Neural networks are frequently a good approach for pattern recognition

D)      All of the above

E)      None of the above

 

4.       With respect to fuzzy system development

A)      Knowledge engineering is completely different than with traditional expert systems

B)      Evaluating and tuning the fuzzy system is frequently difficult and time intensive

C)      Knowledge engineers can be frequently unnecessary due to the intuitiveness of fuzzy logic to the domain expert

D)      All of the above\

E)      None of the above

 

 

Completion (fill in the blank) (mostly key terms (not all of which are a single word))

(3 points each)

 

5.       A suggested means of telling whether a computer is intelligent, the _________ involved judges trying to determine if they were talking to a woman or a man or a computer (across a teletype).

 

6.       Many intelligent systems technologies make use of __________; these are rules of thumb that are likely to be helpful, but which have no guarantee of success.

 

7.       An expert system ________ is a software tool that enables building expert systems via mainly identifying and writing rules. The code to process the rules and manage the “facts” (or “database”) is provided as part of the tool.

 

8.       In expert systems development, the ________  is the person who interviews the expert and turns the expert’s knowledge into rules to be used by the system.

 

9.       A(n) __________ is a fact that is added to the data base in order to influence or control which rules are to be considered at a given time. One rule has on its RHS a conclusion that has no particular meaning other than that it is on the LHS of another rule(s).

 

10.    Probably the most popular defuzzification method is the ________ method. It finds the point where a vertical line would slice the aggregate set created through inference into two equal masses. It is used as part of the Mamdani approach.

 

 

True/False  - If false, explain why!!!!!!

(4 points each)

 

11.    Without a substantial time commitment from the domain expert an expert system development project is likely to fail.

 

12.    The end-user of an expert system is not particularly important during development

 

13.    Adding a rule to an expert system always makes it “smarter.”

 

14.    Backward chaining is less justifiable than forward chaining since it is not driven by the facts at hand.

 

15.    Overlaps between fuzzy sets are undesirable because they cause the fuzzy system to recommend conflicting actions.

 

 

Short Answer

(5 points each)

 

16.    Why is “fire the most specific rule” a reasonable conflict resolution strategy?

 

17.    Why are certainty factors much more frequently used than Bayesian Reasoning for dealing with uncertainty?

 

 


Problems

(points as shown)

 

(8 points)

18.    Given the following set of rules:

IF  hi IQ

AND good work ethic

THEN good grades

 

IF good grades

AND good activities

AND good SATs

AND good essay

THEN accept

 

IF captain of team

THEN good activities

 

IF officer of club

THEN good activities

 

IF high IQ

AND good school

THEN good SATs

 

IF read a lot

AND good school

THEN good SATs

 

IF high income

THEN good SATs

 

IF read a lot

AND good school

THEN good essay

 

IF Kaplan prep

THEN good SATs

 

IF star athlete

THEN accept

 

IF high income

AND parent alumnus

THEN accept

 

And the following facts:

                Hi IQ

                Good school

                High income

                captain of team

                read a lot

 

Using forward reasoning, what new facts are concluded before reasoning stops?

 

 

(8 points)

19.    Given the attached set of plant deficiency rules with certainty factors, and the following facts with certainty factors

   (assert (rootgrowth stunted)  cf .9      ; establish facts about the plant

                                (color purple) cf .8

                                (leafedges scorched) cf .7

                                (leaves small)  cf .6        

 

             )

:               Using forward reasoning, what new facts are concluded before reasoning stops?  For each, give the CF as well.  Show your work.

 

 

 

(10 points)

20.    Given the bloodtypesfortest.clp file, add rule(s) that allow the system to complete the reasoning chain to conclude whether a potential blood donor could be safely used for a potential recipient. Assume that the rules for concluding what blood types a recipient can receive are correct and that rules for startup and printing results are correct. What is still needed is the ability to link up a donor’s blood type to the types that the recipient can receive. Turn in softcopy of your revised rules file, and of trace(s) of a non-match and a match.

 

 

 

(16 points – 8 plus 8)

21.     Given the attached membership functions for number of passengers, distance flying, and amount of fuel needed (output), and the fuzzy rules and inputs below,

A)      What are the membership values for number of passengers and distance fuzzy sets

B)      Show as clearly as possible the output sets (clipping is used) (you can draw on the attached output sets if you clearly mark what the answer is and provide a pointer on the answer sheet)

 

Rules:

        IF distance is Short

        OR passengers are Few

        THEN fuel is Low

 

        IF distance is Intermediate

        AND passengers are Medium

        THEN fuel is Medium

 

 

Inputs:

        Distance = 400

        Passengers = 40

 


;;;;;;;;;;;;;;;;;;;;;;;;;;; Attached Plant Deficiency Rules ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defrule stuntedgrowthrule

                "if plant has stunted growth it may have a nitrogen deficiency"

                (declare (cf .8))   

                (growth stunted)

                =>

                (assert (deficiency nitrogen))

)

 

(defrule paleyellowrule

                "if the plant is a pale yellow color it may have a nitrogen deficiency" 

                (declare (cf .7))   ; certainty factor for rule is .5

                (color paleyellow)

                =>

                (assert (deficiency nitrogen))

)

 

(defrule reddishbrownleafedgesrule

                "if the plant has reddish brown leaf edges it may have a nitrogen deficiency" 

                (declare (cf .8))   

                (leafedges reddishbrown) 

                =>

                (assert (deficiency nitrogen))

)

 

(defrule stuntedrootgrowthrule

                "if plant has stunted root growth it may have a phosphorus deficiency"

                (declare (cf .7))   

                (rootgrowth stunted) 

                =>

                (assert (deficiency phosphorus ))

)

 

(defrule spindlystalkrule

                "if plant has a spindly stalk it may have a phosphorus deficiency"

                (declare (cf .9))   

                (stalk spindly) 

                =>

                (assert (deficiency phosphorus ))

)

 

(defrule purplerule

                "if plant is a purple-ish color it may have a phosphorus deficiency"

                (declare (cf .7))   

                (color purple) 

                =>

                (assert (deficiency phosphorus ))

)

 

(defrule delayedmaturingrule

                "if a plant is delayed in maturing it may have a phosphorus deficiency"

                (declare (cf .6))   

                (mature slow)

                =>

                (assert (deficiency phosphorus ))

)

(defrule scorchedleafedgesrule

                "if the plant has leaf edges that appear scorched and smaller than normal leaves it may have a potassium deficiency" 

                (declare (cf .7))   

                (leafedges scorched) 

                (leaves small)          

                =>

                (assert (deficiency potassium ))

)

 

(defrule weakenedstemrule

                "if the plant has weakened stem it may have a potassium deficiency" 

                (declare (cf .6))   

                (stem weak) 

                =>

                (assert (deficiency potassium ))

)

 

(defrule shriveledseedrule

                "if the plant has shriveled seeds it may have a potassium deficiency" 

                (declare (cf .8))   

                (seeds  shriveled) 

                =>

                (assert (deficiency potassium ))

)

 

(defrule shriveledfruitrule

                "if the plant has shriveled fruit it may have a potassium deficiency" 

                (declare (cf .9))   

                (fruit  shriveled) 

                =>

                (assert (deficiency potassium ))

)

 

;;; works normal way for combining two positive CFs

(defrule combineEvidenceRule

                " combine evidence reaching the same conclusion"

                ?f1 <- (deficiency ?answ)

                ?f2 <- (deficiency ?answ)   ;;; same answer

                (test (not (eq ?f1 ?f2)))

                =>

                (bind ?cf1 (get-cf ?f1))

                (bind ?cf2 (get-cf ?f2))

                (bind ?newcf (+ ?cf1 (* ?cf2 (- 1 ?cf1))))

                (retract ?f1)

                (retract ?f2)

   (disable-rule-cf-calculation) ;; turn off rule cf calculations

                (assert (deficiency ?answ) cf ?newcf)

   (enable-rule-cf-calculation) ;; turn back on again

)

 

(defrule answerrule

                " specify the answer with certainty factor"

                (declare  (salience -1))

                ?f <- (deficiency ?answ)

                =>

                (printout t t " The prediction is " ?answ " with certainty factor " (get-cf ?f) t )                            )


;;;======================================================

;;;   Blood Types for Transfusion Expert System

;;;

;;;     A simple expert system which attempts to identify

;;;     blood types somebody can receive in a transfusion

;;;

;;;     CLIPS Version 6.0 Example

;;;

;;;     To execute, merely load, reset, and run.

;;;======================================================

 

(defrule typeOrule    

                "type O can only receive type O"

                (type O)

                =>

                (assert (canreceive O))

)

 

(defrule typeArule    

                "type A can receive type A or O"

                (type A)

                =>

                (assert (canreceive A)

                                                (canreceive O))

)

 

(defrule typeBrule    

                "type B can receive type B or O"

                (type B)

                =>

                (assert (canreceive B)

                                                (canreceive O))

)

 

(defrule typeABrule    

                "type AB can receive type A, B, AB or O"

                (type AB)

                =>

                (assert (canreceive AB)

                                                (canreceive A)

                                                (canreceive B)

                                                (canreceive O))

)

 

 

;;; not matching fact was put in original facts so that it becomes possible to conclude that there was a match

;;; however, this means that it needs to be retracted when there is a match

(defrule getridofnomatchrule

                " get rid of not matching fact"

                ?f <- (match not)

                (match ? ? ? )    ;;; exactly what the match is doesn't matter

                =>

                (retract ?f)

)

 

(defrule print-answer

                (match ?nm ?don ?typ)

                =>

                (printout t t "It is ok for: " ?nm  " to receive blood from: " ?don " who has type: " ?typ " blood " t t )

)

 

;; made low salience so it doesn't run until other rules have had a chance - so truly has no match

(defrule print-no-match

                (declare (salience -1) )

                (match not)

                (name ?nm)

                (donor ?dn)

                (type ?ty)

                (donortype ?dt)

                =>

                (printout t t "Blood from prospective donor " ?dn " (type " ?dt ") is not compatible with "

                                ?nm " (type " ?ty ")" t t)

)

 

 

 

 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;; for students to write

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 

 

 

 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;; startup - ask for relevant info

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 

(defrule startup

   =>

   (printout t "we are checking if donor is ok for recipient" crlf )

                (printout t " what is the name of the recipient? " t )

                (bind ?name (read))

                (printout t " what is the blood type of the recipient (A, B, AB, or O)? " t )

                (bind ?type (read))

                (printout t " what is the name of the potential donor? " t )

                (bind ?donor (read))

                (printout t " what is the blood type of the potential donor (A, B, AB, or O)? " t )

                (bind ?donortype (read))

   (assert (match not)

                                (name ?name)                    ; establish facts about the situation being analyzed

                                (type ?type)

                (donor ?donor)                   

            (donortype ?donortype )

                                                )

                ;; correct answer - unknown - depends on the community

)


 

 

 

Few Passengers

Membership

10

1

40

0

 

 

Medium Passengers

Membership

30

0

60

1

90

0

 

 

Many Passengers

Membership

80

0

110

1

 

 

 


 

 

 

 

 

Short

Membership

50

1

500

0

 

 

Intermediate

Membership

300

0

800

1

1300

0

 

 

Long

Membership

1000

0

2000

1

 

 

 



 

 

Low

Membership

400

1

1000

0

 

 

Medium

Membership

800

0

1800

1

2800

0

 

 

High

Membership

2500

0

7500

1