Question: Extend the CLIPS rules given in Section 9.5 to produce a more useful system for running an elevator on a building with five floors. 9.5

Extend the CLIPS rules given in Section 9.5 to produce a more useful system for running an elevator on a building with five floors.

9.5 CLIPS (C Language Integrated Production System) CLIPS is a freely available

9.5 CLIPS (C Language Integrated Production System) CLIPS is a freely available expert system shell that has been implemented in C. It provides a language for expressing rules and mainly uses forward chaining to derive conclusions from a set of facts and rules. The notation used by CLIPS is very similar to that used by LISP. The fol- lowing is an example of a rule specified using CLIPS: (defrule birthday (firstname ?rl John) (surname ?rl Smith) (haircolor ?rl Red) => (assert (is-boss ?rl))) ?rl is used to represent a variable, which in this case is a person. Assert is used to add facts to the database, and in this case the rule is used to draw a conclusion from three facts about the person: If the person has the first name John, has the surname Smith, and has red hair, then he is the boss. This can be tried in the following way: (assert (firstname x John)) (assert (surname x Smith)) (assert (haircolor x Red)) (run) At this point, the command (facts) can be entered to see the facts that are contained in the database: CLIPS> (facts) f-0 (firstname x John) f-1 (surname x Smith) f-2 (haircolor x Red) f-3 (is-boss x)

Step by Step Solution

3.41 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Answer To create a more robust elevator system we can extend the CLIPS rules to consider various factors like floor requests elevator movement and doo... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction To Artificial Intelligence Questions!