4
Teaching Introductory AI from First Principles Susan L. Epstein Virginia Teller Hunter College and The Graduate School The City University of New York 695 Park Avenue, New York, N.Y. 10021 sehhc,[email protected] Abstract Hunter College teaches introductory AI as a one semester, advanced undergraduate elective that focuses on issues in three areas: state-space search and control, knowledge representation, and Lisp. The search component defines AI methodology and conveys how the computing world views the field; knowledge repre- sentation illustrates how AI sees the real world; and Lisp shows how to make AI happen. The history and format of the course as it has evolved over a period of fifteen years is covered, along with a description of the course content today and a rationale for teaching AI from this perspective. Why Fundamentals? Our approach to teaching introductory AI embod- ies the notion that the goal of the field is to build computer systems that can solve problems that are hard for computers but easy for people. Although cognitive problem solving techniques are stressed throughout the course, the emphasis is on simulat- ing human intelligence rather than cognitive modeling or emulation. The textbook definition that most closely reflects our position on the importance of engineering workable solutions is found in Rich (1983, p. 37) and Rich & Knight (1991, p. 44), where AI is described as "the study of techniques for solving exponentially hard problems in polynomial time by exploiting knowl- edge about the problem domain." To convey this view of AI in an introductory course, the semester is organized into three nearly equal segments devoted to issues of search and control, knowledge representation, and Lisp, each of which is dis- cussed further below. There are a numberof reasons for our decision to concentrate on first principles, rather than to offer up a smorgasbord of topics in introductory AI. Most important, we believe that without a firm grasp of the underpinnings, students cannot appreciate the accomplishments of the field. Viewed as a smorgasbord, AI may look like a conglomerationof artifacts, each one engineered to solve a different, specific problem. The common- alities amongproblem solving techniques are too easily buried beneath the superficial dissimilari- ties. Hunter students interested in pursuing AI after the introductory course can opt for undergraduate and graduate seminars on specific topics and application areas. Weboth teach advanced cours- es in our own areas of specialization -- Epstein in machine learning and knowledge representation, and Teller in natural language processing and computational linguistics. These topics cannot receive the in-depth treatment they deserve in one introductory semester. Moreover, an attempt to introduce AI with a limited overview of such topics risks leaving students with too narrow a perspective. Throughout the course, artifacts like AM and DENDRAL are used as hooks for topics and techniques in relevant areas. What is Fundamental? Our course is composed of material on search and control, knowledge representation, and Lisp. Search and control Weuse the state space paradigm as the framework for problem solving. When students see an From: AAAI Technical Report FS-94-05. Compilation copyright © 1994, AAAI (www.aaai.org). All rights reserved.

Teaching Introductory AI from First Principles · Teaching Introductory AI from First Principles ... Prolog, Prolog only, and ... Teaching Introductory AI from First Principles

Embed Size (px)

Citation preview

Page 1: Teaching Introductory AI from First Principles · Teaching Introductory AI from First Principles ... Prolog, Prolog only, and ... Teaching Introductory AI from First Principles

Teaching Introductory AI from First Principles

Susan L. EpsteinVirginia Teller

Hunter College and The Graduate SchoolThe City University of New York

695 Park Avenue, New York, N.Y. 10021sehhc,[email protected]

Abstract

Hunter College teaches introductory AI as a onesemester, advanced undergraduate elective that focuseson issues in three areas: state-space search and control,knowledge representation, and Lisp. The searchcomponent defines AI methodology and conveys howthe computing world views the field; knowledge repre-sentation illustrates how AI sees the real world; andLisp shows how to make AI happen. The history andformat of the course as it has evolved over a period offifteen years is covered, along with a description of thecourse content today and a rationale for teaching AIfrom this perspective.

Why Fundamentals?

Our approach to teaching introductory AI embod-ies the notion that the goal of the field is to buildcomputer systems that can solve problems that arehard for computers but easy for people. Althoughcognitive problem solving techniques are stressedthroughout the course, the emphasis is on simulat-ing human intelligence rather than cognitivemodeling or emulation. The textbook definitionthat most closely reflects our position on theimportance of engineering workable solutions isfound in Rich (1983, p. 37) and Rich & Knight(1991, p. 44), where AI is described as "the studyof techniques for solving exponentially hardproblems in polynomial time by exploiting knowl-edge about the problem domain." To convey thisview of AI in an introductory course, the semesteris organized into three nearly equal segmentsdevoted to issues of search and control, knowledgerepresentation, and Lisp, each of which is dis-cussed further below.

There are a number of reasons for our decision

to concentrate on first principles, rather than tooffer up a smorgasbord of topics in introductoryAI. Most important, we believe that without afirm grasp of the underpinnings, students cannotappreciate the accomplishments of the field.Viewed as a smorgasbord, AI may look like aconglomeration of artifacts, each one engineered tosolve a different, specific problem. The common-alities among problem solving techniques are tooeasily buried beneath the superficial dissimilari-ties.

Hunter students interested in pursuing AI afterthe introductory course can opt for undergraduateand graduate seminars on specific topics andapplication areas. We both teach advanced cours-es in our own areas of specialization -- Epstein inmachine learning and knowledge representation,and Teller in natural language processing andcomputational linguistics. These topics cannotreceive the in-depth treatment they deserve inone introductory semester. Moreover, an attemptto introduce AI with a limited overview of suchtopics risks leaving students with too narrow aperspective. Throughout the course, artifacts likeAM and DENDRAL are used as hooks for topicsand techniques in relevant areas.

What is Fundamental?

Our course is composed of material on search andcontrol, knowledge representation, and Lisp.

Search and control

We use the state space paradigm as the frameworkfor problem solving. When students see an

From: AAAI Technical Report FS-94-05. Compilation copyright © 1994, AAAI (www.aaai.org). All rights reserved.

Page 2: Teaching Introductory AI from First Principles · Teaching Introductory AI from First Principles ... Prolog, Prolog only, and ... Teaching Introductory AI from First Principles

interesting task as search in a very large space,they encounter a clear example of intractability.When they attempt to produce a clear definitionof a goal state, they confront the subtleties ofmatching and of problem definition. When theyattempt to maneuver through a large space, theyintuit some of the standard control devices andlearn about others. And, when these generalmethods fall short of any goal, students recognizethe need for heuristics in a large search space.

We draw upon a wealth of examples for thismaterial. In the first homework assignment,students record protocols of themselves solvingseveral classic AI problems (e.g. water jugs, towersof Hanoi, cryptarithmetic), with an emphasis onthe method rather than the answer. Throughoutthe semester their own experience offers cleardemonstrations of many important points. Otherfavorite examples of ours are everyday behavior invery young children, playing board games, travel-ing home after class, and medical diagnosis. Wealso cncourage students to assemble a vocabularyof classic AI artifacts from their reading assign-ments, and to cite them as they are relevant. Inthis manner, cognitive tasks are perceived asenginecring feats where human problem-solvingtechniques can make significant contributions.

Knowledge representation

Examination of AI artifacts motivates the need fordomain-specific knowledge and highlights thetradcoff in AI between generality and power.Through examples, we show the potential impacton search both of knowledge and of a well-chosenrepresentation for it. Although we devote sometime to production rules, frames, and scripts, mostof this section emphasizes predicate calculus.With this foundation we can go on to critiquelogic as a representation and as a basis for reason-ing. As time permits, we raise important ques-tions about any form of knowledge representation:representational adequacy, inferential efficiency,transparency, granularity, and internal consistency.

Lisp

The purpose of the programming component ofthis course is to force students to put theory into

practice. Our work in Lisp is motivated by adiscussion about the nature of languages that bestlend themselves to work in AI. We begin withobjects as a way to represent state spaces, andmethods as ways to move through them. As weintroduce a basic vocabulary of Lisp reservedwords, we encourage our students to experimentthrough the interpreter and to write very small (20to 30 lines) functions that call each other. (Somepurchase Guy Steele’s Common Lisp -- The Lan-guage and explore it extensively.) In the last fewyears, we have designed the programming assign-ments as a series of increasingly sophisticatedmodules that eventually simulate some intelligentbehavior, for example, play an arbitrary game oranswer questions about a piece of text. Studentsdemonstrate proficiency in coding and are expect-ed to construct programs that match and search ina well-understood domain. We can imagine nobetter way to confront the challenges and excite-ment of AI research than to build a program thattruly "looks smart."

Syllabus

Lectures cover most of the material in the firstfive chapters of Rich & Knight. These include allof PART I: PROBLEMS AND SEARCH and the first twochapters of PART II: KNOWI,EDGE REPRESENTATION

as enumerated below:

I. Problems and Search1 What is Artificial Intelligence2 Problems, Problem Spaces, and Search3 Heuristic Search Techniques

II. Knowledge Representation4 Knowledge Representation Issues5 Using Predicate Logic

As time permits, selected material from Chapters9 through 12 may also be introduced. Thesetopics include weak and strong slot-and- fillerstructures, a summary of knowledge representa-tion, and game playing. A midterm test and afinal exam on this material constitute about 50%of the course grade.

The Lisp laboratory covers topics in the first sixchapters of Koschmann (1990) including listprimitives, logical operators, predicates, flow

Page 3: Teaching Introductory AI from First Principles · Teaching Introductory AI from First Principles ... Prolog, Prolog only, and ... Teaching Introductory AI from First Principles

control function definitions, recursion, iteration,and CLOS. Some time is also spent on the MCLeditor and debugger. The programs, plus addi-tional homework (e.g. the protocols and logicexercises) constitute the remaining 50% of thecourse grade.

Additional books on artificial intelligence andLisp, some current and others of primarily histori-cal interest, are on reserve in the library. Theseinch, de The Handbook of Artificial Intelligence andThe En~clopedia of Artificial Intelligence. A reporton thc robot competition at AAAI, complete withphotographs, is a popular handout.

Context

Hunter College is one of nine predominatelyundergraduate senior colleges of the 21-campusCity Univcrsity of New York. It is an urban,public, coeducational, liberal arts institution withan enrollment of more than 20,000 (about 15,000FTE). Over 70% of the student body are women,and more than half are members of racial or ethnicminorities. The Department of Computer Sciencewas created in 1981 with five faculty membersfrom the Department of Mathematics and anoutsidc chair. Today the faculty of three womenand seven men has research interests that includegraph theory, combinatorics, software engineering,networks, and artificial intelligence. Each year thedepartment enrolls about 1000 students in under-graduate courses and graduates roughly 45 of its130 majors, 36% of whom are women and 42%minorities. Many computer science majors areolder students returning to school for a first degreeor secking a second degree to switch careers. It isnot uncommon for students with full time jobsand family commitments to register for fourcourses a semester and attend classes four eve-nings a week for three hours.

Format

Sincc thc early 1980’s, AI has been taught at leastonce a year as a one-semester elective for ad-vanced undergraduates. The texts used haveincluded Patrick Winston’s Art~’cial Intelligence(first and second editions) and Elaine Rich’s bookArtificial Intelligence (first and second editions).

Several options have been tried in developing theprogramming component of the course: no pro-gramming at all, the rudiments of both Lisp andProlog, Prolog only, and Lisp only. The class hashad access to a variety of IBM-compatible PC’s,Apple, and Macintosh computers. The versions ofLisp we have used have evolved along with themicrocomputers: public domain Lisp for theApple, IQ Lisp and GC Lisp for the PC’s, and,most recently, Macintosh Common Lisp (MCL).When MCL arrived, Timothy Koschmann’s TheCOMMONLISP Companion replaced Winston andHorn’s LISP as the programming text.

In recent years AI has been offered yearly inthe fall with Epstein and Teller teaching inalternate years. Rich and Knight’s Artificiallntelli-gence (second edition) and Koschmann’s book Common Lisp are both required for the course.The class typically meets for two 75-minutesessions per week during a 14-week semester.After two or three introductory lectures, Lispinstruction begins in the Macintosh lab, either ina block of six or more consecutive classes oralternating with classroom lectures. As the in-structor lectures and demonstrates, the screen onher computer is projected for the class to see, andthe students can replicate the demonstration attheir workstations. Unless the class is unusuallylarge, this setup generally makes it possible foreach student to gain hands-on experience duringthe lab; however students sometimes have to sharecomputers. (Enrollment in the course is limited to35, but the number is often smaller.)

Issues

The strategy we have adopted for teaching intro-ductory AI is not without its difficulties. Becausewe are unwilling to compromise on a single text-book that teaches AI without Lisp or Lisp withoutAI and can find no satisfactory one that does both,students must buy two textbooks at a cost ofnearly $100. This is undoubtedly a financialburden for some members of the class. The sheeramount of work, with deadlines every week,discourages other students, who perform poorly inpart because they are unable to turn in assign-ments on time. As a result, one quarter to onethird of the class is likely to drop during the

10

Page 4: Teaching Introductory AI from First Principles · Teaching Introductory AI from First Principles ... Prolog, Prolog only, and ... Teaching Introductory AI from First Principles

course of any given semester. In addition, inade-quate weekend hours and overcrowding in theMacintosh laboratory put evening students withfull timc jobs at a disadvantage. This is particular-ly serious because few students have access to acomparable version of Common Lisp elsewhere.

Wc remain convinced, however, that ours is anundcrtaking well worth doing. Every year weforce students to think about the nature of humanintelligence and challenge them to reproducesome fragment of it on a machine. And every yearwe addict at least a few to the challenges andexcitement of AI, challenges they go on to pursuein their education and careers.

References

Feigenbat, m, E. et al., eds. 1982. The Handbook ofArtificial Intelligence. I,os Altos, CA: Kaufmann.

Koschmann, T. 1990. The COMMONLISP Compan-ion. New York: Wiley.

Rich, E. 1983. Artificial Intelligence. New York:McGraw-Hill.

Rich, E. and Knight, K. 1991. Artificiallntelligence,sccond cdition. New York: McGraw-Hill.

Shapiro, S. ed. 1990. The En~clopedia of ArtificialIntelligence. Ncw York: Wiley.

Steele, G. 1990. Common Lisp -- The Language,second edition. Bedford, MA: Digital Press.

Winston, P. 1977. Artificial Intelligence, first edition.Reading, MA: Addison-Wesley.

Winston, P. 1984. Artificial Intelligence, secondedition. Reading, MA: Addison-Wesley.

Winston, P. and Horn, B. 1989. LISP, third edi-tion. Reading, MA: Addison-Wesley.

11