Sept 3/02 LECTURE 1 ========= Text (required for grads): Genesereth & Nilsson, Logical Foundations of AI Supplementary: Russell & Norvig, AI (used in CSC 242). Handout (schedule) gives lecture topics, assignments, exams, weights, office hours, TA (Myrosia Dzikovska, myros@cs.rochester.edu). Distinction between 244/444: 444 will include some extra/different readings and assignments. Most notably: a grad essay/project that should be thought about and started soon (handout next week); abstract, with reference list: Nov 15/02. How to use text and supplementary readings: it's to your advantage to read the specified text material AHEAD of each lecture. The Russell & Norvig book is optional, but can be useful as - a very COMPREHENSIVE, up to date source about AI (much broader scope than this course), for those interested in the subject; has value for other courses too (242, 247/447, 246/446) - for a different, more chatty presentation for students who find some things in G & N hard to understand (but less depth) - more thorough coverage of probabilistic inference, decision making - a possible source of ideas for grad student essays/projects (browse and see what interests you; look at bibliographic/historical notes) Lisp: Wilensky's Common LISPcraft is a standard text, and good guide to learning lisp. A standard reference manual if you know lisp already is Steele's Common LISP: The Language. This is available in electronic form at http://www.cs.cmu.edu/afs/cs.cmu.edu/project/ai-repository/ai/html/cltl/cltl2.html (Warning: this gives few clues about how to *use* the various constructs!). An online introduction and tutorial (and additional references) can be found at http://www.apl.jhu.edu/~hall/lisp.html For students who need an account, I'll pass around a sponsorship form for the UG lab. Role of logic in AI =================== __________________________________________________________________ | | |Intelligent systems need large amounts of knowledge, and the | |ability to use that knowledge for inference and purposeful action.| |Logic is an essential tool in the REPRESENTATION and use of much | |of this knowledge. | |__________________________________________________________________| The need for knowledge ---------------------- The crucial dependence of intelligent behavior on having large amounts of knowledge is by now a truism in AI; it was not obvious at first. But no general problem solving strategy, search strategy or learning strategy BY ITSELF has taken us very far toward intelligent behavior. Even very limited systems for language understanding, or systems for narrow tasks like chess, transportation planning, medical diagnosis, credit advising, etc., require large amounts of knowledge. Some examples illustrating this point: @ Story understanding; from Little Red Riding Hood, just after the point where the wolf has knocked on the door of grandmother's cottage, pretending to be Little Red Riding Hood: The worthy grandmother was in bed, not being very well, and cried out to him, "Pull out the peg and the latch will fall." The wolf drew out the peg and the door flew open. Then he sprang upon the poor old lady and ate her up in less than no time, for he had been more than three days without food. In a detailed analysis of the last passage (see Hwang and Schubert in Minds and Machines 3(4), Nov.93, or in Iwanska & Shapiro's Natural Language Processing and Knowledge Representation, 2000), the following facts were found to be necessary for understanding, among many others. Essentially what "understanding" means here is to figure out how the described events and states "hang together" in a causally coherent way: - Causation is transitive - (Roughly) whatever a part of an event causes, the event as a whole causes as well - If the conjunction of two facts holds because of a third fact, then each of the conjuncts holds because of the third fact - If something flies open then it opens very quickly - If something is "very P" then it is P - If a person does a certain kind of action, and believes that this kind of action is a possible way to bring about a certain kind of event that is harmless to him, then he may INTEND that his action bring about that kind of event. - If someone wants the door of a room or house to open while he is outside of it, that's probably because he wants to enter it. - If one enters a room, one will then be inside the room. - Individuals who are in the same room are near each other. - Bad individuals are apt to do something bad when the opportunity arises. - Eating requires food - Creatures are very hungry when they have not eaten for more than a day - Two successive event sentences in a narrative usually indicate that the two events happened in succession - etc., etc. @ Dealing with a threat in nature, e.g., when a bear shows up at your campfire breakfast on a canoe trip. This can involve knowledge about bear behavior (with regard to food preferences, aggression, flight, etc.), operating a camcorder and knowing what to do when the tape happens to run out (trying to document the adventure!), what can be used in self-defense (axe? paddle? noise?), everything involved in breaking camp quickly, loading up canoes and fleeing as soon as the bear goes off with the box of powdered milk, etc. @ Medical diagnosis: have a look at some medical text, such as Krupp et al., Current Medical Diagnosis and Treatment! The same goes for any other technical field or branch of mathematics. People know at least millions of particular and general facts, such as - the names, personal characteristics (gender, approximate age, general appearance, interests, skills, occupations, personal history, etc) of many family members, friends, associates, and public figures - general facts about people (appearance, body-parts, that they eat and breathe and sleep, how they come into being, mature, age, and die, how they think and feel, how they interact socially, sexually, in education, in business and commerce, etc) - where they live, what their daily routine is, what their belongings are, their particular characteristics and where they are located - general facts about classes of natural objects, artifacts and substances such as what dogs look like, that they bark, are generally friendly domestic animals, have fur, are mammals; that pieces of writing paper are flat and rectangular and of a certain size, and can be written, typed or drawn on, folded, crumpled, burnt, etc.; that parking lots typically have large paved level surfaces, and markings indicating permissible locations of cars, etc - particular and general facts about history, movies, sports, politics, music, crime, math, science, literature, etc. - particular and general facts about words and their meanings - etc., etc. People can STATE these facts in ordinary language. And they can USE them for reasoning and action. I use the term "reasoning" very generally, to include such things as - deducing logical consequences of given facts; - figuring out a plan to achieve a goal; - inferring causal connections between what we see or are told; - inferring explanations for given events or situations; - predicting what will happen in a given situation - figuring out what a speaker meant or intended; _____________________________________________________________________ | | | If we are going to endow machines with human-like intelligence, | | they will have to acquire an amount and variety of factual knowledge| | comparable to that of people, in a form that will enable them to | | talk about and use this knowledge like people do. | |_____________________________________________________________________| While the goal of endowing machines with commonsense knowledge and reasoning abilities is the most central in AI, we should also note the need for representing formal mathematical and technical knowledge and reasoning. For example, it is a long-standing dream to build an automated mathematician or mathematician's assistant that would greatly boost progress in mathematics, helping with very complex proofs and perhaps even formulating mathematical concepts that are natural and relevant in a particular subdomain. In fact, significant results have been achieved along such lines. Similarly we would like reasoners that can design or verify complex circuits or other complex systems (e.g., nuclear reactor shut-down systems), or help with chemical synthesis or analysis, or with the complex mathematics and reasoning involved in modern physics (e.g., the physics of elementary particles, or of fluid flows, etc.). But even mathematical and technical work involves heavy use of acquired knowledge and much intuitive commonsense reasoning, so we probably shouldn't draw any sharp lines: mathematical and scientific knowledge and reasoning are refinements of commonsense knowledge and reasoning, but probably continuous with them. The road to knowledge and commonsense reasoning ----------------------------------------------- The KNOWLEDGE ACQUISITION BOTTLENECK refers to the difficulty of doing the above. How do we get this vast amount of knowledge into computers, and how do we get them to use it effectively? Some possible answers: - Find a general way to REPRESENT knowledge; have "knowledge engineers" code up the knowledge (e.g., Doug Lenat, CACM 38(11)); or acquire the knowledge THROUGH LANGUAGE (being told, reading), perception/physical exploration, and through concept formation and generalization learning - Build mechanisms for making inferences, basically by pattern-matching: we use rules that say if you have a set of facts matching such and such patterns (i.e., having a certain form), then you can draw such-and-such a conclusion (having a certain form based on the input facts). E.g., two such rules might be Given: [fact1 or fact2], not(fact1) Given: bird(x) --------------------------- ----------- Conclude: fact2 Conjecture: flies(x) - Mount a big "behavioral engineering" effort; instead of worrying about representation and inference, focus on what an intelligent agent DOES, what its skills and modes of behavior are; build small subsystems to capture these skills and modes of behavior (using inspiration from natural systems, as well as from math, control theory, engineering, introspection, etc.); learn how to put them together so that the right behaviors are "in charge" at the right time, and they cooperate; layer them into ever larger, more ambitious systems, ... - Build a completely general learning machine, with a built-in tendency to act in a way that optimizes "rewards" (positive feedback); let it loose in a stimulating, realistic learning environment; it should learn facts and inference methods implicitly, just like everything else - Build virtual creatures capable of rapid self-reproduction, and genetic change, letting many variants of them thrive and reproduce in some virtual environment that contains hazards and rewards... Intelligence and learning, including learning of facts, will come automatically as the artificial beings evolve... My belief is that we should and will eventually do ALL of these things. I absolutely do not think we can circumvent the knowledge representation and inference approach, and build a human-like agent just by engineering skills and behaviors, or building the ultimate learning machine, or simulating evolution. Here's a law of nature: If you can't provide a convincing, detailed argument why a device X that you are proposing to build will do Y (e.g., understand language; do commonsense reasoning; learn to talk or plan; etc.), IT WON'T. Murphy's corollary: If you CAN provide a convincing, detailed argument why a device X will do Y, it STILL won't; it will take a drawn-out, often heart-breaking battle to gradually bludgeon your ever-obstinate device, and ever-perverse nature, into giving you something close to Y. The point is this: We can provide convincing, detailed arguments (and of course, many sample systems) showing how we can use explicit knowledge representations and explicit inference methods to enable a computer to talk and reason about various problem domains -- not yet at a human level, but nontrivially. There is as yet nothing to compete with that -- e.g., no behavioral- engineering account of how we can build a system that answers questions or figures out how to stack up some blocks. And they won't become competitive in those areas till they CAN give such an account, in convincing detail. Of course, there are also kinds of "how-to" knowledge that probably are best represented in some non-logical, procedural way: - how the tune for "Twinkle, twinkle" goes - how to ride a bike, catch a ball, use chopsticks, tie shoelaces - how to interpret images falling on our retinas - how to speak grammatically - how to learn Levels of decription, declarativism, proceduralism -------------------------------------------------- I think in discussions of these issues there is often a confusion about LEVELS OF DESCRIPTION of a knowledge-based agent (see R & N, p152-2): - the KNOWLEDGE LEVEL, or EPISTEMOLOGICAL LEVEL: what an agent knows, and knows how to do - the LOGICAL LEVEL: the actual form (syntax) and semantics of the representations used - the IMPLEMENTATION LEVEL: the code and data structures For instance, when we talk about neural nets in terms of the layers of neurons, their interconnections, activation functions, and backpropagation, we are decribing a (possible) agent largely at the implementation level. We will also have to learn to describe it at the logical and epistemological level before we can successfully engineer (coherent) talking or reasoning systems using neural nets. Neural nets aren't an ALTERNATIVE to representation (nor are "subsumption architectures"); they are a way of implementing logical-level knowledge (in the broadest sense of "logical"). Finally, a word about the distinction between DECLARATIVE and PROCEDURAL knowledge. Declarative knowledge consists of explicit, interpretable representations of facts, such as (forall x) dog(x) => can-bark(x), dog(Odie) G & N emphasize that declarative representations are (i) transparent, (ii) modifiable, and (iii) potentially usable for many purposes. By contrast, procedural knowledge (e.g., how to multiply two numbers, invert a matrix, ... or catch a ball, ride a bicycle, or pronounce a word) is typically special-purpose, and computer code that does such tasks is hard to understand and modify, or use for a different purpose. This is true, but I think the key distinction is not so much the declarative/procedural one as the distinction between representations that contain EXTRANEOUS SYMBOLS and those that don't. For instance, consider the following two procedural representations of a routine that makes a robot say "hello" when a person comes near: 1. declare (G,string,"hello") 2. declare (F,boolean,nil) 3. declare (F',boolean,nil) 4. turn-on(proximity-sensor) 5. Repeat-at-intervals(1, sec): a. let F' := read(proximity-sensor) b. IF F' and (not F) THEN write-stream(voice-output,G) c. let F := F'. 1. Turn-on(proximity-sensor) 2. Repeat-at-intervals(1, sec): IF on(proximity-sensor, now) AND off(proximity-sensor,ago(1,sec)) THEN utter("hello"). When we consider knowledge relevant to a particular domain, EXTRANEOUS SYMBOLS are symbols that don't denote anything in that domain -- typically, they are parameters and operators concerned with INTERNAL book-keeping and data manipulation. In the first version, the following symbols are extraneous: declare, G, F, F', string, boolean, nil, let, :=, read, write-stream, voice-output. They denote nothing IN THE DOMAIN, and have only internal significance. In other words, clarity, modifiability, and re-usability require that we ABSTRACT AWAY from the level of internal data manipulation, specifying actions strictly at the level of domain entities, properties, and operators. NOTE: Cooking recipes and furniture assembly instructions can be just as understandable as statements of fact or stories -- yet they are procedural! ------------------ Read ch.1, ch.1.2.1-2.2