DOC PREVIEW
UT CS 343 - The Story Project Part II - Friend or Foe

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

The Story ProjectPart II - Friend or FoeCS343Fall 2006This project builds on part 1. It is a good idea to compile KM using the instructions given in theinitial story project handout. This project is much more challenging than the last one, so makesure that you start early and use the KM manual as a reference.1 Some axiomsEvery physical object has exactly one size. There are 5 sizes: very small, small, medium, large,and very large (call them *VerySmall, *Small, *Medium, *Large, and *VeryLarge respectively). Ifa thing A is larger than another thing B, then B is smaller than A. If something is very small, thenall of its parts are very small too. If you like a person or animal, then he/she is your friend. If youare someone’s friend, then he’s your friend too (and vice-versa). But your friends’ friends are notnecessarily your friends.2 Winnie’s friendsPiglet, Rabbit, and Owl are Winnie’s friends. Piglet is a very small animal. Ve ry small animalsare afraid of every other animal, except the ones who are their friends. Piglet likes all of Winnie’sfriends. Winnie is afraid of one kind of animal-Heffalumps. Rabbits have medium-sized brains.Owls are wise animals so they have very large brains. Every animal is smarter than all animalswith smaller brains, and not as smart as all animals w ith larger brains.3 HintsIf something doesn’t work at first, it might be because certain slot values have not been instantiated.It might help to evaluate some slots at the end of your code by saying something like(the Brain parts of (every Animal))(the larger-than of (the Brain parts of (every Animal)))(the smaller-than of (the Brain parts of (every Animal)))Remember that’s a feature, not a bug. Look at if, forall, and allof expressions in the manual.You’ll want to say something like “for all animals x, if the size of x is very small, then for all partsy of x, the size of y is very small”, and ”Every animal is smarter than all of the animals that havesmaller brains.”4 Questions1. Is Rabbit Piglet’s friend? Yes.1KM> ((the friends of *Piglet) includes *Rabbit)(t)2. Carl is a Heffalump. Is Winnie afraid of him? Yes.KM> (*Carl has (instance-of (Heffalump)))KM> ((the afraid-of of *Winnie) includes *Carl)(t)3. Is Owl smarter than Winnie? Yes.KM> ((the smarter-than of *Owl) includes *Winnie)(t)4. Is Winnie’s brain larger than Rabbit’s brain? No.KM> ((the larger-than of (the Brain parts of *Winnie))includes (the Brain parts of *Rabbit))NIL5 SubmittingSubmit usingturnin --submit jmugan story2 story2.km story2.txtThere is a 20% per day penalty for late submissions. To submit late useturnin --submit jmugan story2-one-day-late story2.km story2.txtturnin --submit jmugan story2-two-days-late story2.km story2.txtturnin --submit jmugan story2-three-days-late story2.km story2.txtIt is important that you call your files story2.km and story2.txt, otherwise the grading program willnot be able to find


View Full Document

UT CS 343 - The Story Project Part II - Friend or Foe

Download The Story Project Part II - Friend or Foe
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view The Story Project Part II - Friend or Foe and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view The Story Project Part II - Friend or Foe 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?