Unformatted text preview:

The Story ProjectCS343Fall 20061 IntroductionThe Story Project is about one of the central themes of artificial intelligence: Representing knowl-edge and reasoning with it. It will give you a chance to see how a real-world “Knowledge Machine”works, and to explore some of the most important questions in AI:• How can we represent real-world knowledge so that a computer can reason with it?• What knowledge is necessary for a given problem?• How can we make a knowledge base perform well on not just one but a wide set of problems?If nothing else, you will see how hard the problem of knowledge representation really is, and whatsome of the problems are that stand between us and true AI. Throughout this project, you will feela constant tension between:• Choosing a representation that is simple and just powerful enough to answer the currentquestions. This will make your job easier, but your knowledge base will end up being “brittle”,i.e. it will only work on a very narrow set of problems.• Choosing a representation that is as general as possible. This will make your knowledge basemore flexible and extensible, but it’s also much harder to do.Obviously, you will have to decide at some point that your knowledge base is general enough(whatever that means). You will have to make reasonable compromises between simplicity andgenerality, and you may find that you have to change your mind as you pro ce ed. Also, you willprobably find that most of the time, general solutions c an be simpler and more elegant than simplyhard-coding the answers to the given questions. There is no one right answer to the representationquestion. Each part of the project will build on the earlier ones. So, at the end, you will have builta single knowledge base that should enable you to answer any of the questions that you have seen.2 Using KMWe will use KM (“The Knowledge Machine”) as our knowledge representation and reasoning engine.KM is a powerful frame-based language developed at UT by Bruce Porter’s Knowledge Systemsgroup. To run KM on the department machines you:1. Download KM (file km-2-0-39.lisp) from http://www.cs.utexas.edu/users/mfkb/RKF/km.html.You will also want to familiarize yourself with the KM manual (it will reduce the amountof time spent banging your head on the keyboard later) and print the quick reference sheetavailable on that site.2. To make life easy, rename km-2-0-39.lisp to km.lisp.13. Start Lisp by typing acl.4. Load KM by typing (load ‘‘km.lisp’’) in Lisp.5. Start KM by typing (km) in the Lisp window. You should see a KM> prompt now.Now you are running KM, open your favorite text editor to write your code. Save the code to afile (say test.km) and load it into KM by typing (load-kb ‘‘test.km’’).A few other things about KM:• If there’s an error, KM will start printing every little thing it does, which can get annoying.Turn it off with (untrace).• The grading program may add instances before loading your knowledge base, make sure thatyou don’t have the command (reset-kb) in the files that you turn in. Note that if you usethe save-kb command then it automatically puts a reset-kb at the top of your file, in thiscase simply delete the reset-kb line.• If you’ve made changes to your knowledge base, and want to reload it, make sure you use(reload-kb ‘‘your-filename’’), not (load-kb ‘‘your-filename’’).• Instead of loading a knowledge base from a file, you can just type KM code directly in theKM window. The best strategy is probably to load your knowledge base from a file and enterthe questions in the KM window. You can also include questions in the file though.• KM will run much faster if you compile it. This only needs to be done once, to do this typeacl(load ‘‘km.lisp’’)(compile-file ‘‘km.lisp’’)Then when you load KM instead of typing (load ‘‘km.lisp’’) you will type (load ‘‘km.fasl’’).• To exit acl type :exit.• If you are an emacs fanatico you can run KM in emacs, follow the instructions athttp://www.cs.utexas.edu/ mooney/cs351/allegro6-emacs.html (but use acl70). Then in emacssplit the window into two, in one start Lisp by typing Alt-x fi:common-lisp.3 The Story ProjectEach part of the project will consist of a simple story and a list of questions that can be answeredusing knowledge from the story. Your job, for e ach part of the project, will be to encode thefacts that are explicitly desc ribed in the story, and any additional knowledge that is required tounderstand the story. When you’re done, your knowledge base will not only be able to answer thegiven questions. If you have done a good job, it will also be able to answer many other questionsabout the knowledge in the story. Your grade will be based on• The answers your knowledge base gives to the questions you have already seen. This shouldbe easy if you use the same names for classes and slots as in the questions, and if you testyour code on the questions.2• The answers your knowledge base gives to a set of questions you haven’t seen before. Thequestions will use only the names for classes and slots from the known questions, so don’tworry about names too much. However, the new questions will test how well you encodedthe given knowledge, and how ge neral your knowledge base is.• A few paragraphs on how you encoded the knowledge in the story. You don’t have to describeevery little feature of your knowledge base. Anything that proves that you yourself haveworked on solving the problems is fine. Write how you solved a certain problem, and whatthe alternatives were. Write how KM was driving you crazy and why. Write how the Englishstory was ambiguous and what that meant for your code. Or simply describe your knowledgebase. Don’t write more than about half a printed page.3.1 An Example StoryHere’s an example for a simple story and a set of questions: Story: All cars have four wheels. Freddrives a Junk-O-Matic. All Junk-O-Matics break down all the time. Fred’s Car is red.Questions:What color is Fred’s car?KM> (the color of (the Car owns of *Fred))(*Red)How many wheels does Fred’s Junk-O-Matic have?KM> (the wheels of (the Junk-O-Matic owns of *Fred))(4)Note that the questions are given both in English and KM, so they give you hints on the kinds offrames and s lots you need. It’s obvious that in order to answer the questions, you will need classescalled Car and Junk-O-Matic. It’s also clear that you’ll nee d two


View Full Document

UT CS 343 - The Story Project

Download The Story Project
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 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 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?