The Department of Computer Science & Engineering
cse@buffalo
UB CSE 4/563

CSE 4/563: Knowledge Representation
Stuart C. Shapiro
Fall, 2009

TTh, 2:00 - 3:20, 222 NSC


"Reports that say something hasn't happened are always interesting to me, because as we know, there are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we do not know. But there are also unknown unknowns -- the ones we don't know we don't know." -- Donald Rumsfeld, February 2002

"We think we know what he means. But we don't know if we really know." -- John Lister, spokesman for Britain's Plain English Campaign, December 1, 2003.


Lecturer TA Class Meetings Course Description
Texts Additional Readings System Documentation Interesting KR Links
UBlearns Site Discussion Board Teams "Programming"
Homeworks Projects Sample Project Report Midterm Exam
Final Exam Grading Academic Policies Calendar
Lecturer:
Prof. Stuart C. Shapiro; 326 Bell Hall, 645-4765; shapiro@buffalo.edu.
Office Hours: MT 11:00-11:50, W 4:00-4:50, or make an appointment via email. See my schedule for my available times.

TA:
Jonathan P. Bona; Room 17, The Commons; 716-568-4856 (Skype) or 645-6173 x 517; jpbona@buffalo.edu.
Office Hours: M 10:00-10:50, T 1:00-1:50 , W 9:00-9:50.

Class Meetings:
CLASS INSTRUCTOR REGISTRATION NO. DAYS HOURSLOCATION
463 Lecture Shapiro xxxxxx TTh 2:00-3:20 NSC 222
563 LectureShapiro xxxxxx TTh 2:00-3:20 NSC 222
463 Recitation R1 Bona 484128 W 8:00-8:50 Bell 337
563 Recitation R1 Bona 130574 W 8:00-8:50 Bell 337
463 Recitation R2 Bona 267987 M 9:00-9:50 Baldy 110
563 Recitation R2 Bona 297223 M 9:00-9:50 Baldy 110

Course Description:
This course is an introduction to the issues and techniques of representing knowledge and belief in a computer system. Of course, a representation is useless unless it can be used for some purpose. The main purpose of items of knowledge and belief is reasoning about and with them. Thus, the field is often called "Knowledge Representation and Reasoning", or "KRR". It is our belief that formal logic provides the basic foundation to KRR. So this course may be considered a course in computational logic. However, there are many systems of logic. The most well-known logics were designed to form the foundations of mathematics, rather than the foundations of human-like representation and reasoning. So this course examines several systems of logic, how they are defined, how reasoning procedures can be implemented for them, and how they can be used for human-like reasoning problems. One semester is only enough time to cover the basics. Additional KRR systems are discussed in the follow-up course: CSE 663, Advanced Knowledge Representation.

This course provides a basic grounding in KRR for people interested in: Artificial Intelligence; Cognitive Science; Computational Linguistics; Philosophy of Mind and of Language; Logic Programming; Database Systems; and applications areas that employ formal representations of ontologies.

Texts:
Required:
Stuart C. Shapiro, Knowledge Representation and Reasoning: Logics for Artificial Intelligence. (Lecture notes.)

Stuart C. Shapiro, Knowledge Representation and Reasoning: Logics for Artificial Intelligence, Chapters 1-6. (The beginning of a book version of the lecture notes.)

Peter Suber, Translation Tips [from English to Symbolic Logic], Philosophy Department, Earlham College.
Recommended:
Jon Barwise & John Etchemendy, Language, Proof and Logic, CSLI Publications, distributed by The University of Chicago Press, 2008. ISBN: 978-1-57586-374-0 . List price with CD $65.00. (Referred to below as B&E.) This book is a more gentle introduction to Logic than the course will be. There are some stylistic differences between this book and the course, but it is highly recommended for students who feel that they need additional tutorial material. However, this package is mostly recommended for the software on the CD, which is directly applicable to the course. The software includes: the program Boole, which helps you construct truth tables; and the program Fitch, which helps you construct Fitch-style formal proofs. Both truth tables and Fitch-style formal proofs will be topics in this course, and there will be homework assigments and exam questions that require you to construct them.

Ronald J. Brachman & Hector J. Levesque, Knowledge Representation and Reasoning, Morgan Kaufmann/Elsevier, 2004. ISBN: 1-55860-932-6. List price $80.95. (Referred to below as B&L.) This book is a less gentle introduction to Logic than the course will be. Chapters 1-6 cover material that will be covered in the course. In the past, the course has also covered material that is in Chapter 9 or the material in Chapter 14. This book will be a required text for CSE 663, Advanced Knowledge Representation.

Ronald J. Brachman & Hector J. Levesque, Knowledge Representation and Reasoning Slides.

Additional Readings:

On-Line Resources:

Discussion Board:
Use the Discussion Board inside the UBlearns Site for questions and discussions meant for the entire class, including clarification of assignments between class and recitation meetings. Check the discussion board regularly for new postings. It will be monitored by the lecturer and the TA.
Do not use the discussion board to share answers to assignments.

"Programming" Exercises and Projects:
This course will not involve any programming in traditional programming languages such as Java, C, Python, or Lisp. However, there will be exercises and projects for which the student will:
  1. prepare a set of inputs to some implemented KR system;
  2. input them to the system;
  3. have the system perform some reasoning tasks based on the input.
For want of a better word, this task is referred to as "programming" below. It has similarities to the more traditional programming task. For instance, it may be that the KR system fails to perform its assigned reasoning task properly, and the student will have to debug the inputs, and try again. The language of the inputs and of the instructions for the KR system to perform the reasoning tasks will be the language of one of the logics studied in class, so prior knowledge of a traditional programming language is not required. General familiarity with the use of computers will, however, be beneficial. Every KR system you will be asked to use is documented on the on-line resources page.

Homeworks:
The purposes of homework exercises are: Small "programming" exercises may be assigned as homework exercises. Homeworks will be assigned in lecture and via this web page. The due date will be announced when the homework is assigned, and will be contained on the homework assignment. They will be due at the beginning of lecture on that date, but will be returned and reviewed in recitation. Some homeworks will be submitted electronically (using submit_cse463 or submit_cse563), in which case instructions will be given with the homework assignment. NO LATE HOMEWORKS WILL BE ACCEPTED.

Once the due date/time has passed, solutions will be posted on the UBlearns Site. You should consider the posted solutions to be required reading.

Grading: Each homework exercise will be worth some modest number of points, which will be stated when the exercise is assigned. The final homework grade will be the percentage of total points possible that were actually earned. To make up for occasional poor performance on homeworks or for late or missed homeworks, there will occasionally be homework questions worth bonus points.

Projects:
To give you experience applying the theory presented in the lectures, there will be three "programming" projects during the semester. Each one will involve building and demonstrating a knowledge-based system. You will be given a corpus of knowledge expressed in English, or directed to compile one, and some questions to be answered and/or tasks to be performed. The KR language and reasoning system to be used will be given more or less specifically. It will be up to you to formalize the corpus/questions/tasks and add any background knowledge "normally assumed".

For each project, you will be expected to hand in a paper, produced using a document formatting program such as LaTeX or Microsoft Word, and printed on 8.5 by 11 inch paper, stapled in the upper left-hand corner, with a title, your name(s), user name(s), and other identifying information at the top of the first page (Do not use the header page automatically produced by the printer), plus a well-documented listing and run of your program. (Do not enclose your paper in a folder or cover.) The main product of your work is the paper, not the program! For general advice on how to prepare a written report, see William J. Rapaport, How to Write. A sample CSE 4/563 paper is available.

In addition to the paper, you are to submit (using submit_cse463 or submit_cse563) your program, so that it can be run and checked if the instructors choose.

You will have three to four weeks to do each project. The due date and time will be announced when the project is assigned.

Each project will be graded on a scale of 0 - 100. A finer break-down will be announced with each project. In general, aspects of writing the paper will be weighted more heavily for CSE563 students than for CSE463 students, and aspects of correctness of the program will be weighted more heavily for CSE463 students than for CSE563 students.

Early projects will be awarded a bonus of 2 points per 24-hour period, or part thereof. That is, a project turned in within the 24-hour period before the due date/time will be considered to be on time. A project turned in more than 24 hours early, but less than 48 hours early, will earn 2 bonus points, etc. The later of the time the paper is turned in and the time the program is submitted will be the time used. At most, the bonus points can raise your grade by 30%. For example, if your project earns 80 points without the bonus points, you can earn up to 24 bonus points (12 days or more early), but if your project earns 50 points without the bonus points, you can earn at most 14 bonus points (7 days or more early).

Late projects will be penalized 10 points per 24-hour period, or part thereof. The later of the time the paper is turned in and the time the program is submitted will be the time used.

You may turn in early or late papers either to the lecturer, the TA, or the CSE Department office (201 Bell Hall). Realize that the only times you may be sure that anyone will be available to accept your paper is immediately before or after the lecture, immediately before or after the recitation, or during office hours---plan ahead. Do not just leave the paper in the instructor's or TA's mailbox, or under their door. Give it to a person, either the instructor, the TA, or a departmental secretary (in 201 Bell Hall), and ask that person to write on the paper the date and time that you turned it in.

Graded projects will be returned in recitation, except for the last project, which will be available in the Lecturer's office after it has been graded. You are encouraged to pick them up.

Teams:
To encourage a non-confrontational, cooperative learning atmosphere in the course, homeworks and projects may be done by teams. One submission should be turned in by each team, with every team member's name and user name on it. Every team member will receive the same grade. If any member of the team is registered for CSE563, the entire team will be treated as registered for CSE563. You may organize your own teams, and you needn't retain the same team throughout the course. A team may not consist of more than three students without the express permission of the Professor.

Midterm Exam:
There will be one 50-minute, closed book, closed notes, no electronic aids, midterm exam, given during class time, in the usual lecture hall. See the Course Calendar for the scheduled date. The exam will consist of True/False, multiple-choice, fill-in-the-blank, and short-answer questions. Short-answer questions will be similar to short homework exercises. The exam will be graded on a scale of 0%-100%. However, the raw point scale might be different. The point value of each question will be shown on the exam paper. Graded exams will be returned in lecture. Once the exam is over, solutions will be posted on the UBlearns Site. You should consider the posted solutions to be required reading.

Final Exam:
There will be a closed book, closed notes, no electronic aids, final exam, given during exam week. The date, time, and place won't be known until after the semester has started, but will be posted in the Course Calendar as soon as possible. The exam will consist of True/False, multiple-choice, fill-in-the-blank, and short-answer questions. Short-answer questions will be similar to short homework exercises. The exam will be graded on a scale of 0%-100%. However, the raw point scale might be different. The point value of each question will be shown on the exam paper. Graded exams will be available in the Lecturer's office after they have been graded. You are encouraged to pick them up.

Grading:
Each homework problem will be assigned a point value. Homework points will be cumulative. The final homework grade will be the percent of points earned over the total of points possible. (Due to the availability of bonus points, this might initially be greater than 100%, but it will be capped at 100%.) Each project will be graded on the basis of 0-100%, then the project grades will be averaged. (Due to bonus points for early submission, this might initially be greater than 100%, but it will be capped at 100%.) Each exam will be graded on the basis of 0-100%. The final course grade will be a weighted average of the total homeworks, the average projects, the midterm exam, and the final exam, according to the following weights:
Homeworks15%
Projects20%
Midterm Exam30%
Final Exam35%
Total100%

The default mapping from percents to letter grades will be the "standard" curve:

CSE 463CSE 563 
93-100A  77-79C+         93-100A  77-79C+
90-92A-  73-76C    90-92A-  70-76C
87-89B+  70-72C-    87-89B+  60-69D
83-86B  67-69D+    83-86B  0-59F
80-82B-  60-66D    80-82B-
      0-59F
A more generous curve may be used. If so, it will be derived from the scores of the CSE 463 population.

You should check the electronic grade sheet within the course UBlearns Site regularly, and promptly report any discrepancy between the grades shown there and your own records of your grades to the Lecturer or the TA.

Academic Policies:
This course will abide by the CSE Department academic integrity policies (See Undergraduate Policies and Graduate Policies. See also Dr. Rapaport's page on academic integrity), the UB undergraduate incomplete policy (see the Undergraduate Catalog Explanation of Grades) and the Graduate School incomplete policy The short versions are:

This course will also abide by the University's principles and procedures regarding students with disabilities. See the Office of Disability Services' statement on UB's Commitment to Disability Access. Notify the lecturer if you need any accommodations under these policies.

Course Calendar:
This is a tentative schedule, and will probably change continually as the semester proceeds.

In this calendar, "krrText" refers to the partial draft book version of the lecture notes listed among the Required Texts; "B&L" refers to the Brachman & Levesque text listed among the Recommended Texts; and "B&E" refers to the Barwise & Etchemendy text listed among the Recommended Texts.
WeekDayDate 
1 Tue9/1 First Lecture
Introduction to Course; Introduction to Knowledge Representation and Reasoning:
Chap 1 slides p. 1 - 9; krrText, Chap. 1; B&L, Chap. 1; B&L Slides, Chap 1.
 Thu9/3 HW0 assigned.
Introduction to Knowledge Representation and Reasoning:
Chap 1 slides p. 10 - 18; krrText, Chap. 1, 2;
"An Approach to Serenity";
B&L, Chap. 1; B&L Slides, Chap 1.
Introduction to Logic: krrText, Chap. 3; B&E, Introduction.
The "Standard" Propositional Logic: Chap 2 slides, p. 19-44; krrText, Chap. 4 - Sec. 6.3.2; B&E, 1.0-1.4, 3.0-3.7, 7.0-7.3.
2Tue9/8 Semantics of the "Standard" Propositional Logic & Model Finding: Chap 2 slides, p. 45 - 65; krrText, Sec. 6.3.3 - 6.3.10
truthTable.xls cpw.xls
 Wed9/9 First Meeting of Recitation R1
 Thu9/10 HW0 due.
HW1 assigned.
Domain Rules & The KRR Enterprise: Chap 2 slides, p. 66 - 74; krrText, Sec. 6.3.11
cpwRules.xls;
Computational methods for determining entailment and validity: Chap 2 slides, p. 75-94; krrText, Sec. 6.4
 Fri9/11 Drop/Add deadline
3 Mon9/14 First Meeting of Recitation R2
  Tue9/15
Computational methods for determining entailment and validity: Chap 2 slides, p. 90-96;
Tom's Evening Domain.pptx
 Thu9/17
HW1 due. Solutions posted in UBlearns.
HW2 assigned.
Proof Theory of Standard, Classical Propositional Logics: Chap 2 slides, p. 97-125; krrText, Sec. 6.5
4 Tue9/22 Review of Fitch-Style Proofs: Chap 2 slides, p. 109-125;
Implementing Natural Deduction, Properties of Logical Systems: Chap 2 slides, p. 126-134;
Clause Form Propositional Logic: Chap 2 slides, p. 135-141;
 Thu9/24 HW2 due. Solutions posted in UBlearns.
HW3 assigned.
Resolution: B&L, Chap. 4; Chap 2 slides p. 142-166
prover and SNARK
5 Mon9/28 Yom Kippur: no classes
  Tue9/29 Project 1 assigned.
Refutation Resolution: Chap 2 slides p. 167-171;
Predicate Logic Over Finite Models: Chap 3 slides p. 172-202; B&L, Chap. 2
 Thu10/1 HW3 due. Solutions posted in UBlearns.
HW4 assigned.
Predicate Logic Over Finite Models: Chap 3 slides p. 203-222;
B&L, Chap. 2
6 Tue10/6 Full First-Order Predicate Logic: B&L, Chap. 2; Chap 4 slides p. 223-273
 Thu10/8 HW4 due. Solutions posted in UBlearns.
HW5 assigned.
Proof theory of Clause-Form Full First-Order Predicate Logic: B&L, Chap. 4; Chap 4 slides p. 274-298
7 Tue10/13 Proof Theory of Clause-Form Full First-Order Predicate Logic: B&L, Chap. 4; Chap 4 slides p. 298-322
 Thu10/15
HW5 due. Solutions posted in UBlearns.
HW6 assigned.
Clause-Form FOL: B&L, Chap. 4; Chap 4 slides p. 323-353
8 Tue10/20 Summary of Part I: Chap 5 slides
Midterm Review
 Thu10/22 HW6 due. Solutions posted in UBlearns.
Midterm Exam. Solutions posted in UBlearns.
9 Tue10/27 Project 1 due.
Project 2 assigned.
Review of Midterm Exam
Rule-based systems, Formalizing difficulties: B&L, Chap. 4; Chap 4 slides p. 354-358
 Thu10/29 HW7 assigned.
FOL Wrapup: B&L, Chap. 4; Chap 4 slides p. 359-364
Prolog: Chap 6 slides p. 379-383
10 Tue11/3 Prolog: Chap 6 slides p. 384-399
 Thu11/5 HW7 due. Solutions posted in UBlearns.
HW8 assigned.
Prolog: Chap 6 slides p. 400-412
11 Tue11/10 A Potpourri of Subdomains: Chap 7 slides p. 413-429
 Thu11/12 HW8 due. Solutions posted in UBlearns.
HW9 assigned.
SNePS: Chap 8 slides, p. 430-454
Paper: SNePS: A Logic for Natural Language Understanding and Commonsense Reasoning,
Paper: A SNePSLOG Guide to SNePS 2
 Fri11/13 R deadline
12 Tue11/17
Project 2 due.
Project 3 assigned.
SNePS: Chap 8 slides, p. 455-480
 Thu11/19 HW9 due. Solutions posted in UBlearns.
HW10 assigned.
SNePS: Chap 8 slides, p. 481-495
Examples of path-based inference:
/projects/shapiro/CSE563/Examples/SNePSLOG/pbinf1.snepslog /projects/shapiro/CSE563/Examples/SNePSLOG/pbinf2.snepslog /projects/shapiro/CSE563/Examples/SNePSLOG/pbinf3.snepslog
Belief Revision: Chap 9 slides, p. 512-523
13 Tue11/24 HW10 due. Solutions posted in UBlearns.
HW11 assigned.
Belief Revision: Chap 9 slides, p. 524-563
 Thu11/26 Thanksgiving: no classes
14 Tue12/1 Review Project 2
 Thu12/3 HW11 due. Solutions posted in UBlearns.
Description Logics: Chap 13 slides, p. 605-619
15 Mon12/7 Last Meeting of Recitation R2
 Tue12/8 The Situation Calculus: Chap 10 slides, p. 564-582
 Wed12/9 Last Meeting of Recitation R1
 Thu12/10
Last Lecture
Project 3 due.
Course summary: Chap 11 slides
 Wed12/16 Final Exam: Knox 104 3:30-6:30


Last modified: Wed Mar 31 08:39:37 2010
Stuart C. Shapiro <shapiro@cse.buffalo.edu>