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

CSE 4/563: Knowledge Representation
Stuart C. Shapiro
Spring, 2008

MWF, 11:00 - 11:50, 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
Text Additional Readings On-Line Resources Interesting KR Links
Discussion Board "Programming" Homeworks Projects
Grading Academic Policies Sample Project Report Calendar
UBlearns Site
Lecturer:
Prof. Stuart C. Shapiro, 326 Bell Hall, 645-3180 ext. 125, shapiro@cse.buffalo.edu
Office Hours: M 4:00-4:50, TTh 11:00-11:50, or make an appointment via email. See my schedule for my available times.

TA:
Christopher Hoeflich, Trailer B desk 18, 645-6164 ext. 513, csh7@cse.buffalo.edu
Office Hours: T 9:00-10:00, 2:00-3:00, Th 2:00-3:00.

Class Meetings:
CLASS INSTRUCTOR REGISTRATION NO. DAYS HOURSLOCATION
463 LectureShapiro MWF 11:00-11:50 NSC 222
563 LectureShapiro MWF 11:00-11:50 NSC 222
463 Recitation A1 Hoeflich 449056 T 8:00-8:50 Capen 10
563 Recitation A1 Hoeflich 416728 T 8:00-8:50 Capen 10
463 Recitation A2 Hoeflich 035625 M 12:00-12:50 Norton 209
563 Recitation A2 Hoeflich 328334 M 12:00-12:50 Norton 209

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; Deductive Database Systems; Logic Programming; Philosophy of Mind and of Language; and applications areas that employ formal representations of ontologies.

Texts:
Stuart C. Shapiro, Knowledge Representation and Reasoning: Logics for Artificial Intelligence, lecture notes.

(RECOMMENDED) Peter Suber, Translation Tips [from English to Symbolic Logic], Philosophy Department, Earlham College. (Accessed January 14, 2008.)

(RECOMMENDED) Ronald J. Brachman & Hector J. Levesque, Knowledge Representation and Reasoning, Morgan Kaufmann/Elsevier, 2004. (Referred to below as B&L.) Knowledge Representation and Reasoning Slides by Brachman and Levesque.

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.

Homeworks:
The purposes of homework exercises are: to give you hands-on experience with relatively small problems; to give you a chance to assess the level of your understanding; to give you experience with the kinds of questions that may be asked on exams. 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.
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 any 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, 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.

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 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. 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.

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. As of Project 3, bonus points will be capped at 30% of the points earned.

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 maximum points possible. (Due to the availability of bonus points, this might be greater than 100%.) Each project will be graded on the basis of 0-100%, then the project grades will be averaged. 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:
Homeworks20%
Projects25%
Midterm Exam25%
Final Exam30%
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 Departmental Academic Integrity policies and procedures, (see also the CSE Graduate Studies Committee web page on Academic Integrity).
and the Departmental 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.
WeekDayDate 
1 Mon1/14 First Lecture
Introduction to Course
 Wed1/16 Introduction to Knowledge Representation and Reasoning and to Logic: "An Approach to Serenity";
Chap 1 slides; Shapiro 2004, Chap. 1;
B&L, Chap. 1; B&L Slides, Chap 1.
 Fri1/18 The "Standard" Propositional Logic: Chap 2 slides, p. 18-33; Shapiro 2004, Sec. 2.1-2.2
2 Mon1/21 Martin Luther King, Jr. Day
 Wed1/23 HW1 assigned.
Semantics of the "Standard" Propositional Logic: Chap 2 slides, p. 34-43; Shapiro 2004, Sec. 2.2
 Fri1/25 Drop/Add deadline
Domain Rules & Model Finding Methods: Chap 2 slides, p. 44-50
Example of effect of domain rules: cpw.xls
3 Mon1/28
First Meeting of Recitation A2
Logical Implication & Model-Finding Refutation Methods: Chap 2 slides, p. 51-69
 Tue1/29 First Meeting of Recitation A1
 Wed1/30 HW1 due, solutions have been posted in UBlearns.
HW2 assigned.
Proof Theory of the Standard Propositional Logic: Chap 2 slides, p. 70-83
 Fri2/1
Fitch-Style Proof Theory of the Standard Propositional Logic, continued: Chap 2 slides, p. 84-96
4 Mon2/4 Summary---Properties of Logical Systems: Chap 2 slides p. 95-97;
Clause-Form Propositional Logic: B&L, Chap. 4; Chap 2 slides p. 98-113
 Wed2/6 HW2 due, solutions have been posted in UBlearns.
HW3 assigned.
Refutation Resolution: B&L, Chap. 4; Chap 2 slides p. 114-123; prover and SNARK
 Fri2/8 Refutation Resolution on Standard Wfps: Chap 2 slides p. 124-134
Predicate Logic Over Finite Models: B&L, Chap. 2; Chap 3 slides p. 135-145
5 Mon2/11 Project 1 assigned.
 Wed2/13 HW3 due, solutions have been posted in UBlearns.
HW4 assigned.
Predicate Logic Over Finite Models: B&L, Chap. 2; Chap 3 slides p. 146-158
 Fri2/15 Predicate Logic Over Finite Models: Chap 3 slides p. 159-164
6 Mon2/18 The "Standard" Finite-Model Predicate Logic: Chap 3 slides p. 165-168
Clause-Form Finite-Model Predicate Logic: Chap 3 slides p. 169-180
 Wed2/20 HW4 due, solutions have been posted in UBlearns.
HW5 assigned.
The "Standard" Full First-Order Predicate Logic: B&L, Chap. 2; Chap 4 slides p. 181-211
 Fri2/22 The "Standard" Full First-Order Predicate Logic: B&L, Chap. 2; Chap 4 slides p. 212-232
7 Mon2/25 Clause-Form Full First-Order Predicate Logic: B&L, Chap. 4; Chap 4 slides p. 233-242
 Wed2/27 HW5 due solutions have been posted in UBlearns.
Clause-Form FOL: B&L, Chap. 4; Chap 4 slides p. 242-267
 Fri2/29
Class canceled
8 Mon3/3 Summary of Part I: Chap 5 slides
Midterm Review
 Wed3/5 HW6 assigned.
Midterm Exam. Solutions have been posted in UBlearns.
 Fri3/7 Project 1 due.
Clause-Form FOL, Asking Wh Questions: B&L, Chap. 4; Chap 4 slides p. 268-
  Mon3/10 Spring Break
 Wed3/12 Spring Break
 Fri3/14 Spring Break
9 Mon3/17 Project 2 assigned.
FOL Wrapup: B&L, Chap. 4; Chap 4 slides p. 284-296
 Wed3/19 HW6 due. Solutions have been posted in UBlearns.
HW7 assigned.
Prolog: Chap 6 slides p 305-315
 Fri3/21 Prolog: Chap 6 slides p. 316-332
10 Mon3/24 Prolog: Chap 6 slides p. 333-334
A Potpourri of Subdomains: Chap 7 slides p. 335-345
 Wed3/26 HW7 due, Solutions have been posted in UBlearns.
HW8 assigned.
No class: Grad Conference.
 Fri3/28 R deadline
A Potpourri of Subdomains: Chap 7 slides p. 346-351
SNePS: Chap 8 slides, p. 352-363
Paper: SNePS: A Logic for Natural Language Understanding and Commonsense Reasoning,
Paper: An Introduction to SNePS
11 Mon3/31 SNePS: Chap 8 slides, p. 364-377
 Wed4/2 HW8 due. Solutions have been posted in UBlearns.
HW9 assigned.
SNePS: SNePSLOG Jobs demo; Chap 8 slides, p. 378-384
 Fri4/4 Chap 8 slides, p. 385-393
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
12 Mon4/7
SNeRE: Chap 8 slides, p. 394-409; SNePS 2.7 User's Manual, Chapter 6.5.
Belief Revision/Truth-Maintenance Systems: Chap 9 slides, p. 410-415
 Wed4/9 HW9 due. Solutions have been posted in UBlearns.
HW10 assigned.
Project 3 assigned.
See:
Stuart C. Shapiro and Michael Kandefer, A SNePS Approach to The Wumpus World Agent or Cassie Meets the Wumpus. In Leora Morgenstern and Maurice Pagnucco, Eds., IJCAI-05 Workshop on Nonmonotonic Reasoning, Action, and Change (NRAC'05): Working Notes, IJCAII, Edinburgh, 2005, 96-103.
Chap 9 slides, p. 416-432
 Fri4/11 Project 2 due.
Demonstration of some SNeRE agents.
13 Mon4/14 R, The Logic of Relevant Implication: Chap 9 slides, p. 433-457
 Wed4/16 HW10 due, Solutions have been posted in UBlearns.
HW11 assigned.
Review solutions to HW10
 Fri4/18 Finish reviewing solutions to HW10
Relevance Logic in SNePS: Chap 9 slides, p. 458-461
14 Mon4/21 SNePS Reasoning Heuristics: Chap 8 slides, p. 410-418
 Tue4/22 Last Meeting of Recitation A1
 Wed4/23
HW11 due, Solutions will be posted in UBlearns.
SNePS Reasoning Heuristics: Chap 8 slides, p. 419-426
 Fri4/25 SNePS Reasoning Heuristics: Chap 8 slides, p. 427-431
15 Mon4/28 Last Lecture
Last Meeting of Recitation A2
Course summary: Chap 11 slides
 Wed4/30
Reading Day
 Fri5/2 Project 3 due, 5:00 PM.
 Mon5/5 Final Exam, 8:00-11:00 AM, Cooke 127

Last modified: Mon Apr 28 08:51:02 EDT 2008
Stuart C. Shapiro <shapiro@cse.buffalo.edu>