CSci 431

Exercise set #6

Due: Thursday, Nov. 30


Prolog exercises

Prolog exercises should all be placed in the file <yourusername>.pl in the handins folder, and should include adequate header and internal documentaion.

 

A first CLIPS exercise (problem 7.9, page 398, of Giarratano and Riley)

 

Plants require many different types of nutrients for proper growth. Three of the most important plant nutrients that are provided by fertilizer are nitrogen, phosphorus, and potassium. A deficiency in one of these nutrients will produce vraious symptoms. Translate the following heuristics below to rules that determine nutrient deficiency. Assume that the plant is normally green.

Use deftemplates to describe the facts used in the rules. The input to the program should be made by asserting symptoms as facts (using deffacts). The output should indicate which nutrient deficiencies exist by printing to the terminal. Implement a method so that multiple printouts for a single deficiency caused by more than one symptom are avoided. Test your program with the following inputs:

 

 Please call this program <yourusername>.CLP and place it in the handins folder.


Any questions? Please ask!