We will work again with information having to do with


Assignment

We will work again with information having to do with family structure. You will get an opportunity to deal with user input, error checking, control facts and (possibly) salience. [I had originally intended to have this assignment deal with finding childre n, sons, daughters, grandparents, grandmothers, grandfathers, grandchildren, grandsons, granddaughters, ancestors and descendents as well. It seemed a bit much once I got into it!] This time we will use the following deftemplate and deffacts:

(deftemplate family

(slot mother)

(slot father)

(multislot daughters)

(multislot sons))

(deffacts family-tree
(family (mother Viola) (father Holt)

(daughters Frances Mildred))
(family (mother Cora) (father Walter)

(daughters Jaunita Dorothy Peggy) (sons Norm Carson)) (family (mother Frances) (father Norm)

(daughters Susan) (sons Norman Steve)) (family (mother Susan) (father Charlie)

(daughters Melissa) (sons Chris)) (family (mother Linda) (father Steve)

(daughters Kristin) (sons Stephen Jonathan)) (family (mother Kristin) (father Ryan)
(sons RJ))

(family (mother Sandy) (father Stephen) (sons Austin Parker))

(family (mother Amy) (father Jonathan) (sons Grayson)))

For your convenience I have placed these two constructs in the file BetterFamily. CLP under the Course Materials on the course website.

Starting with the file BetterFamily.clp that I have given you, you should add the required rules so that your expert system will perform as demonstrated below. DO NOT change the 2 constructs in the original file. Here is a sample execution (Notice that it should be possible to ask for the same information more than once):

CLIPS> (load BetterFamily.CLP)

[ stuff that shows things being loaded ] CLIPS> (reset)
CLIPS> (run)

Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
6 is not a valid response, silly! Give me a 1 through 4. Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)? one
one is not a valid response, silly! Give me a 1 through 4. Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? Frances Here are the parents of Frances:
Viola is Frances's mother. Holt is Frances's father.
Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? Walter
I can find no information on Walter's parents. Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? George
I know noth ing abou t George!
Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? Frances Here are the parents of Frances:

Viola is Frances's mother. Holt is Frances's father.
Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? Susan Frances is Susan's mother.
Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? Viola
I can find no information on Viola's parents. Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? Blondie I know nothing about Blondie!
Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? Parker Stephen is Parker's father.
Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.
4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special someone? Cora
I can find no information on Cora's parents. Tell me what you're looking for:
1) The parents of someone.
2) The mother of someone.
3) The father of someone.

4) I'd like to quit!

What's your pleasure (1-4)?
... and who is that special som eone? Go mer
I know nothing about Gomer!

Tell me what you're looking for:

1) The parents of someone.

2) The mother of someone.

3) The father of someone.

4) I'd like to quit!

What's your pleasure (1-4)?

Thanks for chatting with me! CLIPS>

Solution Preview :

Prepared by a verified Expert
Programming Languages: We will work again with information having to do with
Reference No:- TGS01653100

Now Priced at $50 (50% Discount)

Recommended (98%)

Rated (4.3/5)