Lecture 1


Published on

notes of introductory chapters of Artificial intelligence

Published in: Education, Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Lecture 1

  1. 1. BEG471CO Introduction to Artificial Intelligence Er.Roshan Koju Department of Computer Engineering Khwopa Engineering College
  2. 2. First, a little bureaucracy ... The course text book: Artificial Intelligence: A Modern Approach (2003), 2nd Edition, Stuart Russell and Peter Norvig.
  3. 3. How you will be graded .... <ul><li>Course work: </li></ul><ul><ul><li>3 Assignments (some programming, some Q&A): 1 marks each </li></ul></ul><ul><ul><li>2 marks for attendance </li></ul></ul><ul><ul><li>10marks for assessment and 5 marks for UT </li></ul></ul><ul><ul><li>10marks for lab test </li></ul></ul><ul><ul><li>5marks for lab reports </li></ul></ul><ul><ul><li>10marks for presentation </li></ul></ul><ul><li>Late policy: </li></ul><ul><ul><li>Assignments: 20% off for each late day. Please start early!! </li></ul></ul>
  4. 4. OUTLINE <ul><li>Applications </li></ul><ul><li>Introduction </li></ul><ul><li>Ethics of AI </li></ul><ul><li>Branches of AI </li></ul><ul><li>History of AI </li></ul><ul><li>Relation of AI with other domains </li></ul><ul><li>Intelligent agents and types </li></ul><ul><li>Assignment 1 </li></ul>
  5. 5. Why study AI? Search engines Labor Science Medicine/ Diagnosis Appliances What else?
  6. 6. Honda Humanoid Robot Walk Turn Stairs http://world.honda.com/robot/
  7. 7. Sony AIBO http://www.aibo.com
  8. 8. Natural Language Question Answering http:// www.ai.mit.edu/projects/infolab / http://aimovie.warnerbros.com
  9. 9. Intelligence <ul><li>Intelligence is: </li></ul><ul><ul><li>the ability to reason </li></ul></ul><ul><ul><li>the ability to understand </li></ul></ul><ul><ul><li>the ability to create </li></ul></ul><ul><ul><li>. . . </li></ul></ul><ul><li>Can we produce a machine with all these abilities? </li></ul><ul><li>The answer is no, so then what is AI? </li></ul>
  10. 10. Formal Definitions <ul><li>Barr and Feigenbaum </li></ul><ul><ul><li>“ Artificial Intelligence is the part of computer science concerned with designing intelligence computer systems, that is, systems that exhibit the characteristics we associate with intelligence in human behavior.” </li></ul></ul><ul><li>Elaine Rich </li></ul><ul><ul><li>“ AI is the study of how to make computers do things at which, at the moment, people are better” </li></ul></ul><ul><li>AI is the science and engineering of making intelligent machines which can perform tasks that require intelligence when performed by humans …” </li></ul>
  11. 11. What is AI? The exciting new effort to make computers thinks … machine with minds, in the full and literal sense” (Haugeland 1985) “ The art of creating machines that perform functions that require intelligence when performed by people” (Kurzweil, 1990) “ The study of mental faculties through the use of computational models” (Charniak et al. 1985) A field of study that seeks to explain and emulate intelligent behavior in terms of computational processes” (Schalkol, 1990) Systems that think like humans Systems that think rationally Systems that act like humans Systems that act rationally
  12. 12. Types of tasks <ul><li>Everyday tasks : recognize a friend, recognize who is calling, translate from one language to another, interpret a photograph, talk, cook a dinner </li></ul><ul><li>Formal tasks : prove a logic theorem, geometry, calculus, play chess, checkers, or Go </li></ul><ul><li>Expert tasks : engineering design, medical designers, financial analysis </li></ul>
  13. 13. “ Chinese room” argument <ul><li>Person who knows English but not Chinese sits in room </li></ul><ul><li>Receives notes in Chinese </li></ul><ul><li>Has systematic English rule book for how to write new Chinese characters based on input Chinese characters, returns his notes </li></ul><ul><ul><li>Person=CPU, rule book=AI program, really also need lots of paper (storage) </li></ul></ul><ul><ul><li>Has no understanding of what they mean </li></ul></ul><ul><ul><li>But from the outside, the room gives perfectly reasonable answers in Chinese! </li></ul></ul><ul><li>Searle’s argument: the room has no intelligence in it! </li></ul>
  14. 14. Acting Humanly: The Full Turing Test <ul><li>Alan Turing's 1950 article Computing Machinery and Intelligence discussed conditions for considering a machine to be intelligent </li></ul><ul><ul><li>“ Can machines think?”  “Can machines behave intelligently?” </li></ul></ul><ul><ul><li>The Turing test (The Imitation Game): Operational definition of intelligence. </li></ul></ul><ul><li>Computer needs to posses: Natural language processing, Knowledge representation, Automated reasoning, and Machine learning </li></ul><ul><li>Problem: 1) Turing test is not reproducible, constructive, and amenable to mathematic analysis. 2) What about physical interaction with interrogator and environment? </li></ul><ul><li>Total Turing Test: Requires physical interaction and needs perception and actuation. </li></ul>
  15. 15. What would a computer need to pass the Turing test? <ul><li>Natural language processing: to communicate with examiner. </li></ul><ul><li>Knowledge representation: to store and retrieve information provided before or during interrogation. </li></ul><ul><li>Automated reasoning: to use the stored information to answer questions and to draw new conclusions. </li></ul><ul><li>Machine learning: to adapt to new circumstances and to detect and extrapolate patterns. </li></ul>
  16. 16. What would a computer need to pass the Turing test? <ul><li>Vision (for Total Turing test): to recognize the examiner’s actions and various objects presented by the examiner. </li></ul><ul><li>Motor control (total test): to act upon objects as requested. </li></ul><ul><li>Other senses (total test): such as audition, smell, touch, etc. </li></ul>
  17. 17. Thinking Humanly: Cognitive Science <ul><li>1960 “Cognitive Revolution”: information-processing psychology replaced behaviorism </li></ul><ul><li>Cognitive science brings together theories and experimental evidence to model internal activities of the brain </li></ul><ul><ul><li>What level of abstraction? “Knowledge” or “Circuits”? </li></ul></ul><ul><ul><li>How to validate models? </li></ul></ul><ul><ul><ul><li>Predicting and testing behavior of human subjects (top-down) </li></ul></ul></ul><ul><ul><ul><li>Direct identification from neurological data (bottom-up) </li></ul></ul></ul><ul><ul><ul><li>Building computer/machine simulated models and reproduce results (simulation) </li></ul></ul></ul>
  18. 18. Thinking Rationally: Laws of Thought <ul><li>Aristotle (~ 450 B.C.) attempted to codify “right thinking” What are correct arguments/thought processes? </li></ul><ul><li>E.g., “Socrates is a man, all men are mortal; therefore Socrates is mortal” </li></ul><ul><li>Several Greek schools developed various forms of logic: notation plus rules of derivation for thoughts. </li></ul>
  19. 19. Thinking Rationally: Laws of Thought <ul><li>Problems: </li></ul><ul><ul><li>Uncertainty: Not all facts are certain (e.g., the flight might be delayed). </li></ul></ul><ul><ul><li>Resource limitations: </li></ul></ul><ul><ul><ul><li>Not enough time to compute/process </li></ul></ul></ul><ul><ul><ul><li>Insufficient memory/disk/etc </li></ul></ul></ul><ul><ul><ul><li>Etc. </li></ul></ul></ul>
  20. 20. Acting Rationally: The Rational Agent <ul><li>Rational behavior: Doing the right thing! </li></ul><ul><li>The right thing: That which is expected to maximize the expected return </li></ul><ul><li>Provides the most general view of AI because it includes: </li></ul><ul><ul><li>Correct inference (“Laws of thought”) </li></ul></ul><ul><ul><li>Uncertainty handling </li></ul></ul><ul><ul><li>Resource limitation considerations (e.g., reflex vs. deliberation) </li></ul></ul><ul><ul><li>Cognitive skills (NLP, AR, knowledge representation, ML, etc.) </li></ul></ul><ul><li>Advantages: </li></ul><ul><ul><li>More general </li></ul></ul><ul><ul><li>Its goal of rationality is well defined </li></ul></ul>
  21. 21. How to achieve AI? <ul><li>How is AI research done? </li></ul><ul><li>AI research has both theoretical and experimental sides. The experimental side has both basic and applied aspects. </li></ul><ul><li>There are two main lines of research: </li></ul><ul><ul><li>One is biological , based on the idea that since humans are intelligent, AI should study humans and imitate their psychology or physiology. </li></ul></ul><ul><ul><li>The other is phenomenal , based on studying and formalizing common sense facts about the world and the problems that the world presents to the achievement of goals. </li></ul></ul><ul><li>The two approaches interact to some extent, and both should eventually succeed. It is a race, but both racers seem to be walking. [ John McCarthy] </li></ul>
  22. 22. Modern Turing Test <ul><li>“ On the web, no one knows you’re a….” </li></ul><ul><li>Problem: ‘bots’ </li></ul><ul><ul><li>Automated agents swamp services </li></ul></ul><ul><li>Challenge: Prove you’re human </li></ul><ul><ul><li>Test: Something human can do, ‘bot can’t </li></ul></ul><ul><li>Solution: CAPTCHAs </li></ul><ul><ul><li>Distorted images: trivial for human; hard for ‘bot </li></ul></ul>
  23. 23. Human intelligence <ul><li>Turing provided some very persuasive arguments that a system passing the Turing test is intelligent. </li></ul><ul><li>However, the test does not provide much traction on the question of how to actually build an intelligent system. </li></ul>
  24. 24. Human intelligence <ul><li>In general there are various reasons why trying to mimic humans might not be the best approach to AI. </li></ul>10 14 10 9 Memory updates/sec 10 14 bits/sec 10 10 bits/sec Bandwidth 10 -3 sec 10 -9 sec Cycle time 10 11 neurons 10 14 synapses 10 10 bits RAM 10 11 bits disk Storage Units 10 11 neurons 1 CPU, 10 8 gates Computational Units Human Brain Computer
  25. 25. Human intelligence <ul><li>In general there are various reasons why trying to mimic humans might not be the best approach to AI. </li></ul><ul><ul><li>But more importantly, we know very little about how the human brain performs its higher level processes. Hence, this point of view provides very little information from which a scientific understanding of these processes can be built. </li></ul></ul><ul><ul><li>Neuroscience has been very influential in some areas of AI, however. For example, in robotic sensing, vision processing, etc. </li></ul></ul>
  26. 26. Is AI Ethical? <ul><li>Joseph Weizenbaum (1976) in Computer Power and Human Reason argues: </li></ul><ul><li>A real AI would indeed be an autonomous, intelligent agent </li></ul><ul><ul><li>Hence, out of our control </li></ul></ul><ul><li>It will not share our: motives, constraints, ethics </li></ul><ul><li>There is no obvious upper bound on intelligence. And perhaps there is no upper bound at all. </li></ul><ul><ul><li>When our interests and AI's interests conflict, guess who loses </li></ul></ul><ul><ul><li>Therefore, AI research is unethical. </li></ul></ul>
  27. 27. Asimov’s Laws of Robotics <ul><li>A method to insert ethics into AI </li></ul><ul><li>The three laws of robots are: </li></ul><ul><ul><li>A robot may not injure a human being or, through inaction, allow a human being to come to harm. </li></ul></ul><ul><ul><li>A robot must obey the orders given it by human beings. </li></ul></ul><ul><ul><li>A robot must protect its own existence. </li></ul></ul><ul><ul><li>Meta-law: Precedence order is lower to higher </li></ul></ul>
  28. 28. Objections to Asimov’s Laws <ul><li>Ambiguity in terms: harm, obey, order . . . </li></ul><ul><li>Unclear how to resolve intra-rule conflicts (e.g., conflicting human interests) </li></ul><ul><li>They are far too narrow </li></ul><ul><ul><li>Cover robot-self, robot-human relations but not relations with </li></ul></ul><ul><ul><ul><li>Other robots </li></ul></ul></ul><ul><ul><ul><li>Other sentient beings </li></ul></ul></ul><ul><ul><ul><li>The environment </li></ul></ul></ul>
  29. 29. Branches of AI <ul><li>Logical AI </li></ul><ul><li>Search </li></ul><ul><li>Natural language processing </li></ul><ul><li>pattern recognition </li></ul><ul><li>Knowledge representation </li></ul><ul><li>Inference From some facts, others can be inferred. </li></ul><ul><li>Automated reasoning </li></ul><ul><li>Learning from experience </li></ul><ul><li>Planning To generate a strategy for achieving some goal </li></ul><ul><li>Epistemology Study of the kinds of knowledge that are required for solving problems in the world. </li></ul><ul><li>Ontology Study of the kinds of things that exist. In AI, the programs and sentences deal with various kinds of objects, and we study what these kinds are and what their basic properties are. </li></ul><ul><li>Genetic programming </li></ul><ul><li>Emotions??? </li></ul><ul><li>… </li></ul>
  30. 30. AI Prehistory
  31. 31. AI History
  32. 32. Relation of AI with other domains <ul><li>Philosophy (400 B.C-) </li></ul><ul><li>Socrates->Plato->Aristotle </li></ul><ul><ul><li>Socrates: “I want to know what is characteristic of piety which makes all actions pious...that I may have it to turn to, and to use as a standard whereby to judge your actions and those of other men” (algorithm) </li></ul></ul><ul><ul><li>Aristotle: Try to formulate laws of rational part of the mind. Believed in another part, intuitive reason </li></ul></ul>
  33. 33. <ul><li>Philosophy: Dualism vs. materialism </li></ul><ul><li>Rene Descartes (1596-1650): dualism (part of mind that is outside of nature) </li></ul><ul><li>Materialism . Wilhelm Leibniz (1646-1716) built a mechanical device to carry out mental operations; could not produce interesting results </li></ul>
  34. 34. <ul><li>Philosophy: Source of knowledge </li></ul><ul><li>Empiricism (Francis Bacon 1561-1626) </li></ul><ul><ul><li>John Locke (1632-1704): “Nothing is in the understanding which was not in the senses” </li></ul></ul><ul><ul><li>David Hume (1711-1776): Principle of induction: General rules from repeated associations between their elements </li></ul></ul><ul><ul><ul><li>Bertrand Russell (1872-1970): Logical positivism : All knowledge can be characterized by logical theories connected, ultimately, to observed sentences that correspond to sensory inputs </li></ul></ul></ul>
  35. 35. <ul><li>Mathematics </li></ul><ul><li>Logic </li></ul><ul><ul><li>George Boole (1815-1864): formal language for making logical inference </li></ul></ul><ul><ul><li>Gottlob Frege (1848-1925): First-order logic (FOL) </li></ul></ul><ul><ul><li>Computability </li></ul></ul><ul><ul><ul><li>David Hilbert (1862-1943): Problem #23: is there an algorithm for deciding the truth of any logical proposition involving the natural numbers? </li></ul></ul></ul><ul><ul><ul><li>Kurt Godel (1906-1978): No: undecidability (yes for FOL) </li></ul></ul></ul><ul><ul><ul><li>Alan Turing (1912-1954): which functions are computable? </li></ul></ul></ul><ul><ul><ul><ul><li>Church-Turing thesis: any computable function is computable via a Turing machine </li></ul></ul></ul></ul><ul><ul><ul><ul><li>No machine can tell in general whether a given program will return an answer on a given input, or run forever </li></ul></ul></ul></ul>
  36. 36. <ul><li>Mathematics… </li></ul><ul><li>Intractability </li></ul><ul><ul><li>Polynomial vs. exponential (Cobham 1964; Edmonds 1965) </li></ul></ul><ul><ul><li>Reduction (Dantzig 1960, Edmonds 1962) </li></ul></ul><ul><ul><li>NP-completeness (Steven Cook 1971, Richard Karp 1972) </li></ul></ul><ul><ul><li>Contrasts “Electronic Super-Brain” </li></ul></ul>
  37. 37. <ul><li>Mathematics… </li></ul><ul><li>Probability </li></ul><ul><ul><li>Gerolamo Cardano (1501-1576): probability in gambling </li></ul></ul><ul><ul><li>Pierre Fermat (1601-1665), Blaise Pascal (1623-1662), James Bernoulli (1654-1705), Pierre Laplace (1749-1827): new methods </li></ul></ul><ul><ul><li>Bernoulli: subjective beliefs->updating </li></ul></ul><ul><ul><li>Thomas Bayes (1702-1761): updating rule </li></ul></ul><ul><li>Decision theory = probability theory + utility theory </li></ul><ul><ul><li>John Von Neumann & Oskar Morgenstern 1944 </li></ul></ul><ul><li>Game theory </li></ul>
  38. 38. <ul><li>Psychology (1879-) </li></ul><ul><li>Scientific methods for studying human vision </li></ul><ul><ul><li>Hermann von Helmholtz (1821-1894), Wilhelm Wundt (1832-1920) </li></ul></ul><ul><li>Introspective experimental psychology </li></ul><ul><ul><li>Wundt </li></ul></ul><ul><ul><li>Results were biased to follow hypotheses </li></ul></ul><ul><li>Behaviorism (prevailed 1920-1960) </li></ul><ul><ul><li>John Watson (1878-1958), Edward Lee Thorndyke (1874-1949) </li></ul></ul><ul><ul><li>Against introspection </li></ul></ul><ul><ul><li>Stimulus-response studies </li></ul></ul><ul><ul><li>Rejected knowledge, beliefs, goals, reasoning steps </li></ul></ul>
  39. 39. Psychology <ul><li>Cognitive psychology </li></ul><ul><ul><li>Brain posesses and processes information </li></ul></ul><ul><ul><li>Kenneth Craik 1943: knowledge-based agent: </li></ul></ul><ul><ul><ul><li>Stimulus -> representation </li></ul></ul></ul><ul><ul><ul><li>Representation is manipulated to derive new representations </li></ul></ul></ul><ul><ul><ul><li>These are translated back into actions </li></ul></ul></ul><ul><ul><li>Widely accepted now </li></ul></ul><ul><ul><li>Anderson 1980: “A cognitive theory should be like a computer program” </li></ul></ul>
  40. 40. Agents <ul><li>An over-used, over-loaded, and misused term. </li></ul><ul><li>Anything that can be viewed as perceiving its environment through sensors and acting upon that environment through its effectors to maximize progress towards its goals . Hence, an agent gets percepts one at a time, and maps this percept sequence to actions (one action at a time) </li></ul><ul><li>Human agent: </li></ul><ul><ul><li>eyes, ears, and other organs for sensors </li></ul></ul><ul><ul><li>hands, legs, mouth, and other body parts for actuators </li></ul></ul><ul><li>Robotic agent: </li></ul><ul><ul><li>cameras and infrared range finders for sensors </li></ul></ul><ul><ul><li>various motors for actuators </li></ul></ul>
  41. 41. <ul><li>The agent function: an abstract mathematical description </li></ul><ul><ul><li>The agent function maps from percept histories to actions: </li></ul></ul><ul><li>[ f : P*  A ] </li></ul><ul><li>The agent program: a concrete implementation </li></ul><ul><ul><li>The agent program runs on the physical architecture to implement f </li></ul></ul>Agent ? Sensors Environment Agent percepts actions ? Sensors Effectors How to design this?
  42. 42. <ul><li>Example: Human mind as network of thousands or millions of agents working in parallel. To produce real artificial intelligence, this school holds, we should build computer systems that also contain many agents and systems for arbitrating among the agents' competing results. </li></ul><ul><li>Distributed decision-making and control </li></ul><ul><li>Challenges: </li></ul><ul><ul><li>Action selection: What next action to choose </li></ul></ul><ul><ul><li>Conflict resolution </li></ul></ul>sensors effectors Agency
  43. 43. How is an Agent different from other software? <ul><li>Agents are autonomous , that is, they act on behalf of the user </li></ul><ul><li>Agents contain some level of intelligence , from fixed rules to learning engines that allow them to adapt to changes in the environment </li></ul><ul><li>Agents don't only act reactively , but sometimes also proactively </li></ul>
  44. 44. How is an Agent different from other software? <ul><li>Agents have social ability , that is, they communicate with the user, the system, and other agents as required </li></ul><ul><li>Agents may also cooperate with other agents to carry out more complex tasks than they themselves can handle </li></ul><ul><li>Agents may migrate from one system to another to access remote resources or even to meet other agents </li></ul>
  45. 45. Examples of agents in different types of applications Agent type Percepts Actions Goals Environment Medical diagnosis system Symptoms, findings, patient's answers Questions, tests, treatments Healthy patients, minimize costs Patient, hospital Satellite image analysis system Pixels of varying intensity, color Print a categorization of scene Correct categorization Images from orbiting satellite Part-picking robot   Pixels of varying intensity Pick up parts and sort into bins Place parts in correct bins Conveyor belts with parts Refinery controller     Temperature, pressure readings Open, close valves; adjust temperature   Maximize purity, yield, safety   Refinery     Interactive English tutor   Typed words     Print exercises, suggestions, corrections Maximize student's score on test Set of students    
  46. 46. Vacuum-cleaner world <ul><li>Percepts: location and contents, e.g., [A,Dirty] </li></ul><ul><li>Actions: Left , Right , Suck , NoOp </li></ul>
  47. 47. The Right Thing = The Rational Action <ul><li>Rational Action: The action that maximizes the expected value of the performance measure given the percept sequence to date </li></ul><ul><ul><li>Rational = Best ? </li></ul></ul><ul><ul><li>Rational = Optimal ? </li></ul></ul><ul><ul><li>Rational = Omniscience ? </li></ul></ul><ul><ul><li>Rational = Clairvoyant ? </li></ul></ul><ul><ul><li>Rational = Successful ? </li></ul></ul>
  48. 48. The Right Thing = The Rational Action <ul><li>Rational Action: The action that maximizes the expected value of the performance measure given the percept sequence to date </li></ul><ul><ul><li>Rational = Best ? </li></ul></ul><ul><ul><li>Rational = Optimal ? </li></ul></ul><ul><ul><li>Rational = Omniscience ? </li></ul></ul><ul><ul><li>Rational = Clairvoyant ? </li></ul></ul><ul><ul><li>Rational = Successful ? </li></ul></ul>
  49. 49. Rational agents: definition <ul><li>Rational Agent : For each possible percept sequence , a rational agent should select an action that is expected to maximize its performance measure , given the evidence provided by the percept sequence and whatever built-in knowledge the agent has. </li></ul><ul><li>Performance measure: An objective criterion for success of an agent's behavior </li></ul><ul><ul><li>E.g., performance measure of a vacuum-cleaner agent could be amount of dirt cleaned up, amount of time taken, amount of electricity consumed, amount of noise generated, etc. </li></ul></ul>
  50. 50. PEAS: formalization <ul><li>PEAS: Performance measure, Environment, Actuators, Sensors </li></ul><ul><li>Must first specify the setting for intelligent agent design </li></ul><ul><li>Consider, e.g., the task of designing an automated taxi driver: </li></ul><ul><ul><li>Performance measure </li></ul></ul><ul><ul><li>Environment </li></ul></ul><ul><ul><li>Actuators </li></ul></ul><ul><ul><li>Sensors </li></ul></ul><ul><li>automated taxi driver: </li></ul><ul><ul><li>Performance measure : Safe, fast, legal, comfortable trip, maximize profits </li></ul></ul><ul><ul><li>Environment : Roads, other traffic, pedestrians, customers </li></ul></ul><ul><ul><li>Actuators : Steering wheel, accelerator, brake, signal, horn </li></ul></ul><ul><ul><li>Sensors : Cameras, sonar, speedometer, GPS, odometer, engine sensors, keyboard or microphone </li></ul></ul>
  51. 51. Environment types <ul><li>Fully observable (vs. partially observable ): An agent's sensors give it access to the complete state of the environment at each point in time </li></ul><ul><li>Deterministic (vs. stochastic ): The next state of the environment is completely determined by the current state and the action executed by the agent </li></ul><ul><ul><li>In partially observable case, it could appear to be stochastic </li></ul></ul><ul><ul><li>If the environment is deterministic except for the actions of other agents, then the environment is strategic </li></ul></ul><ul><li>Episodic (vs. sequential ): The agent's experience is divided into atomic &quot;episodes&quot; </li></ul><ul><ul><li>each episode consists of the agent perceiving and then performing a single action </li></ul></ul><ul><ul><li>the choice of action in each episode depends only on the episode itself </li></ul></ul><ul><li>Static (vs. dynamic): The environment is unchanged while an agent is deliberating </li></ul><ul><ul><li>The environment is semidynamic if the environment itself does not change with the passage of time but the agent's performance score does </li></ul></ul><ul><li>Discrete (vs. continuous): A limited number of distinct, clearly defined percepts and actions </li></ul><ul><li>Single agent (vs. multiagent): An agent operating by itself in an environment </li></ul><ul><ul><li>Entity B is an agent or merely a stochastically behaving object? </li></ul></ul><ul><ul><ul><li>Maximize its performance measure depending on agent A’s behavior </li></ul></ul></ul><ul><ul><li>Multiagent </li></ul></ul><ul><ul><ul><li>competitive vs. cooperative </li></ul></ul></ul><ul><ul><ul><li>Communication </li></ul></ul></ul><ul><li>A hardest combination from 6 categories? </li></ul>
  52. 52. Environment types Environment Accessible Deterministic Episodic Static Discrete Chess with a clock Yes Yes No Semi Yes Chess without a clock Yes Yes No Yes Yes Poker No No No Yes Yes Backgammon Yes No No Yes Yes Taxi driving No No No No No Medical diagnosis system No No No No No Image-analysis system Yes Yes Yes Semi No Part-picking robot No No Yes No No Refinery controller No No No No No Interactive English tutor No No No No Yes
  53. 53. Table-lookup agent <ul><li>Drawbacks: </li></ul><ul><ul><li>Huge table </li></ul></ul><ul><ul><li>Take a long time to build the table </li></ul></ul><ul><ul><li>No autonomy </li></ul></ul><ul><ul><li>Even with learning, need a long time to learn the table entries </li></ul></ul>function Table-Driven-Agent( percept ) returns an action static: percepts , a sequence // initially empty table , a table of actions // indexed by percept sequences append percept to the end of percepts action <- LookUp ( percepts , table ) return action
  54. 54. Look up table agent obstacle sensor Stop 2 Turn left 30 degrees 5 No action 10 Action Distance
  55. 55. Agent types <ul><li>Four basic types in order of increasing generality: </li></ul><ul><ul><li>Simple reflex agents </li></ul></ul><ul><ul><li>Model-based reflex agents </li></ul></ul><ul><ul><li>Goal-based agents </li></ul></ul><ul><ul><li>Utility-based agents </li></ul></ul><ul><li>How to convert into learning agents </li></ul>
  56. 56. Simple reflex agents
  57. 57. Simple reflex agents <ul><li>A simple reflex agent works by finding a rule whose condition matches the current situation (as defined by the percept) and then doing the action associated with that rule. </li></ul>function Simple-Reflex-Agent( percept ) returns an action static: rules , a set of condition-action rules state <- Interrupt-Input ( percept) rule <- Rule-Match ( state,rules ) action <- Rule-Action ( rule ) return action
  58. 58. Model-based reflex agents
  59. 59. Model-based reflex agents <ul><li>To handle partial observability, agent keeps track of the part of the world it cannot see now </li></ul><ul><ul><li>Internal state </li></ul></ul><ul><li>Tries to model the world in two ways </li></ul><ul><ul><li>How the world evolves independently of the agent </li></ul></ul><ul><ul><li>How the agent’s action affect the world </li></ul></ul>function Model-Based-Reflex-Agent( percept ) returns an action static: state , a description of the current world rules , a set of condition-action rules action , the most recent action state <- Update-State ( state, action, percept) rule <- Rule-Match ( state, rules ) action <- Rule-Action ( rule ) return action
  60. 60. <ul><li>Encode “internal state of the world to remember the past as contained in earlier percepts </li></ul><ul><li>Needed because sensors do no usually give the entire state of the world at each input, so perception of the environment is captured over time. “State” used to encode different “world states” that generate the same immediate percept </li></ul><ul><li>Requires ability to represent change in the world with/without the agent </li></ul><ul><ul><li>one possibility is to represent just the latest state, but then cannot reason about hypothetical courses of action </li></ul></ul><ul><li>Example: Rodney Brook’s Subsumption Architecture . Main idea: build complex intelligent robots by decomposing behaviors into a hierarchy of skills, each completely defining a complete percept-action cycle for one very specific task. For example, avoiding contact, wandering, exploring, recognizing doorways, etc. Each behavior is modeled by a finite-state machine with a few states (though each state may correspond to a complex function or module). Behaviors are loosely-coupled, asynchronous interactions </li></ul>Model-based reflex agents
  61. 61. (model-based) Goal-based agents <ul><li>The agent needs goal information that describes desirable situations </li></ul><ul><li>Consider future </li></ul><ul><li>Search and planning to find action sequences for goal </li></ul><ul><li>Less efficient but more flexible </li></ul>
  62. 62. Utility-based agents <ul><li>Goals alone are not enough to generate high-quality behavior sometimes </li></ul><ul><ul><li>Goal are often binary distinction e.g. happy vs. unhappy </li></ul></ul><ul><li>A utility function maps a state (or its sequence) onto a real number, e.g. the degree of happiness </li></ul><ul><ul><li>Can provide a tradeoff between conflicting goals e.g. speed vs. security </li></ul></ul><ul><li>If multiple goals, the likelihood of success of each goal can be weighed up against the importance of the goals </li></ul>
  63. 63. Utility-based agents
  64. 64. <ul><li>When there are multiple possible alternatives, how to decide which one is best? </li></ul><ul><li>A goal specifies a crude destination between a happy and unhappy state, but often need a more general performance measure that describes “degree of happiness” </li></ul><ul><li>Utility function U: State  Reals indicating a measure of success or happiness when at a given state </li></ul><ul><li>Allows decisions comparing choice between conflicting goals, and choice between likelihood of success and importance of goal (if achievement is uncertain) </li></ul>Utility-based agents
  65. 65. Learning agents <ul><li>So far, we talked about various methods for selecting actions </li></ul><ul><ul><li>We have not explained how the agent programs come into being </li></ul></ul><ul><li>4 major components </li></ul><ul><ul><li>Learning element is responsible for making improvements </li></ul></ul><ul><ul><ul><li>Percept has no idea of how to evaluate the state of the world </li></ul></ul></ul><ul><ul><ul><li>Uses feedback from critic </li></ul></ul></ul><ul><ul><li>Critic tells the learning agent how well the agent is doing </li></ul></ul><ul><ul><ul><li>in terms of performance standard </li></ul></ul></ul><ul><ul><ul><li>Note that performance standard is fixed </li></ul></ul></ul><ul><ul><li>Performance element is responsible for selecting external actions </li></ul></ul><ul><ul><ul><li>This is the agent in the previous slides </li></ul></ul></ul><ul><ul><ul><li>Takes percept and decides on actions </li></ul></ul></ul><ul><ul><li>Problem generator is responsible for suggesting actions that will lead to new and informative experiences </li></ul></ul><ul><ul><ul><li>Can choose suboptimal but exploratory actions </li></ul></ul></ul>
  66. 66. Learning agents
  67. 67. Assignments -1 <ul><li>History of AI </li></ul><ul><li>Relation of AI with other Domains </li></ul><ul><li>Human intelligence Vs artificial intelligence </li></ul><ul><li>Performance measure of Automated car </li></ul><ul><li>Applications of AI </li></ul><ul><ul><li>Submission date: within may 18,2010 </li></ul></ul><ul><ul><li>Submit at: ko_rosh@yahoo.com </li></ul></ul>
  68. 68. <ul><li>We will study search techniques from next classes </li></ul><ul><li>Get ready!!!!! </li></ul>Thank you