1 / 68

Artificial Intelligence

Artificial Intelligence. Mr. Anuj Khanna Computer Science & Engineering Department, KIOT , Kanpur. By: Anuj Khanna (Asst. Prof.) www.uptunotes.com. What Is Artificial Intelligence?.

ossie
Download Presentation

Artificial Intelligence

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Artificial Intelligence Mr. Anuj Khanna Computer Science & Engineering Department, KIOT , Kanpur By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  2. What Is Artificial Intelligence? • A branch of CSE which deals with making computers to do things at which presently humans are better. Systems that learn new concepts and tasks, can understand natural language or perceive and comprehend a visual scene and some more biological capabilities of humans. • Computers are better in doing repetitive jobs like writing addresses on 2000 cards. • Humans are better in doing jobs like common sense reasoning, driving car, theorem proving etc. • Generally, these tasks being done by humans involve what we call as “Intelligence”. By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  3. What is Intelligence?? • Intelligence = Knowledge + Search strategy for exploring KB to draw useful conclusions. • Thus, in AI our objective is to simulate KB and the search strategies in computers so that they can behave in a way similar to the humans. • “Intelligence is the ability to learn /understand or deal with new /challenging situations. ” • It is the ability to apply knowledge to manipulate one’s environment or think abstractly as measured by objective criterion. • Ability to exercise Thoughts and Reasoning • Intelligence embodies all of the knowledge and data , both conscious and unconscious which we have acquired through the study and experience. By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  4. Examples of Intelligence • Highly refined sight and sound perception. (ii) Thought , imagination. (iii) How a three year old child learns with it’s surrounding and experience them, finally uses those perceptions intelligently with aquired knowledge. e.g: Giving you a cassette, or aksing to play a particular track mentioned on CD , Using elctronic gadgetswithout the ability of reading and writing, or moreover asking you intelligently to play his favourite cartoon channel. • All this is possible because of infrences drawn by child’s brain to read a set of patterns, make it’s image in mind and using it intelligently daily……More it uses it better it becomes towards reasoning and understanding. By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  5. (iv) Ability to converse , read , write . (v) Drive a car , memorize & recall facts, feel emotions etc. (vi) Integrated sum of facts , enabling to recall a face not seen for thirty or more years (vii) To build and send rocket on the moon. (viii) To recall learned concepts in the Exam hall or Solving a completely new problem in exam using knowledge acquired in past through experience using REASONING. By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  6. Definitions based on two dimensions • Upper dimension concerned with “Thought Processes” & Reasoning. • Lower dimensions incorporating “Behaviour” in m/c to make them intelligent like humans. (A) Definitions Based on success in terms of fidelity to human performance (i) Systems that think humanly (ii) Act Humanly (B) Definitions based on Rationality (i) Systems that think Rationally (ii) Act Rationally By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  7. Systems that think Humanly AI is the branch of computer science concerned with the study and creation of computer m/c which exhibit some form of intelligence. (OR) Automation of activities (viz: Automated Reasoning/Inferencing)that we associate with human thinking, activities such as decision making ,problem solving & learning (By Bellman, 1978). Systems that Act like Humans “Art of creating machines that perform functions requiring intelligence when performed by people(By Kurzweil)” “Study of how to make computers do things better which currently people do better”(By rich & Knight,1991) By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  8. Systems that Think Rationally “A System is rational if it does the right thing given what it knows”. “Artificial Intelligence is the study of mental faculties through the use of computational models(By Charniak & Mc Dormott)”. • Study of computations that make it possible to perceive , reason and act. Systems that Act Rationally “Computational intelligence is the study of design of Intelligent Agents/Intelligent behaviour in the artifacts.” By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  9. Man Vs Computer Machine By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  10. Man Vs Computer Machine By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  11. Characteristics Possesed by Intelligence • Responding to situations flexibly. • Make sense out of ambiguous & contradictory messages(Apply reasoning & thought process in NLP/NLU). • Assigning relative priority to different elements of a problem. Example: In Ethical Robotics giving importance to different tasks as per current user requirement or command. • Finding similarities b/w situation despite differences which may separate them. • To draw distinctions b/w situations despite similarities which may link them. By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  12. History of AI • The gestation of AI(1943-1955 ,By Warren McCulloh & Walter Pitts) • Knowledge of basic physiology and fn of neurons in brain • Formal analysis of Propositional Logic by Russell & Whitehead • Turing’s theory of computation(suggested neurons as a ON and OFF switch with a stimulus response). • Donald Hebb in 1943, proposed Hebbian learning rules i.e. connection & modification in synaptic strengths. • Marvin Minsky in 1951, built first Neural Network Computer called SNARC (used 3000 vaccum tubes & automated pilot mechanism to simulate a N/W of 40 neurons). By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  13. 2. Birth of AI(1956): • Reasoning program Logic Theorist by Newell & Simon. A computer program capable of of thinking non-numerically to solve mind body problem. • In 1958 John McCarthy (i)wrote HLL called LISP(second oldest HLL) (ii) Designed a program Advice Taker • Marvin Minsky (1958) Introduction of microworldsthat appear to require intelligence to solve: e.g. Blocks-world. Anti-logic orientation, society of the mind. 3. Collapse in AI research (1966 - 1973) • Progress was slower than expected. • Unrealistic predictions. • Some systems lacked scalability. • Combinatorial explosion in search. By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  14. 4. AI revival through knowledge-based systems (1969-1970) • General-purpose vs. domain specific E.g. the DENDRAL project (Buchanan et al. 1969) • First successful knowledge intensive system Expert systems • MYCIN to diagnose blood infections (Feigen Baum et al.) (i)Introduction of uncertainty in reasoning. (ii)Increase in knowledge representation research. (iii) Logic, frames, semantic nets, … • AI becomes an industry (1980 - present) • R1 at DEC (McDermott, 1982) • Fifth generation project in Japan (1981,intelligent computers running prolog. • Connectionist revival (1986 - present) • Parallel distributed processing (Rumel Hart and McClelland, 1986); By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  15. AI becomes a science (1987 - present) • In speech recognition: Hidden Markov models • In neural networks • In uncertain reasoning and expert systems: Bayesian network formalism • The emergence of intelligent agents (1995 - present) The whole agent problem: “How does an agent act/behave embedded in real environments with continuous sensory inputs” (i) SOAR ,a complete Agent Architecture. (ii) Real Time embedded agents like Internet search engine Google. (iii) AI system Deep Blue in 1997, defeated Garry Kasporov in chess. (iv) CYC reasoning program for capturing common sense reasoning. By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  16. Thinking humanly: Cognitive modeling 1. 1960s "cognitive revolution": Information-processing psychology • Requires scientific theories of internal activities of the brain. • Concern with mind , mental and emotional process. • Psychologists model human cognition on m/c. 2.How to validate? This Requires i) Predicting and testing behavior of human subjects (top-down) OR ii) Direct identification from neurological data (bottom-up) • Both approaches (roughly, Cognitive Science and Cognitive Neuroscience) are now distinct from AI By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  17. Test validity of theories Development theory of human intelligence Computer Models • Cognitive scientists attempt to simulate behavior called Modelling and Simulation. Feedback Cognitive scientist Computer Engineers AI researchers By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  18. Acting humanly: Turing Test • Turing (1950) "Computing machinery and intelligence": • "Can machines think?"  "Can machines behave intelligently?" • Operational test for intelligent behavior: the Imitation Game • Predicted that by 2000, a machine might have a 30% chance of fooling a lay person for 5 minutes • Anticipated all major arguments against AI in following 50 years • Suggested major components of AI: knowledge, reasoning, language understanding, learning. By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  19. Thinking rationally: "laws of thought" • Aristotle: What are correct arguments/thought processes? • Several Greek schools developed various forms of logic:notation and rules of derivation for thoughts; may or may not have proceeded to the idea of mechanization. • Direct line through mathematics and philosophy to modern AI Problems: • Not all intelligent behavior is mediated by logical deliberation • What is the purpose of thinking? What thoughts should I have? By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  20. Acting Rationally: rational agent • Rational behavior: “doing the right thing” • The right thing: that which is expected to maximize goal achievement, given the available information • Doesn't necessarily involve thinking – e.g., blinking reflex – but thinking should be in the service of rational action Performance Measures: • Success of agent behavior • Agent generates sequence of actions when plunked into environment, according to perception. • This causes state changes in environment • Desirable sequence Agent has performed well By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  21. Factors that influence rationality: • Performance measure for success • Prior knowledge of environment • Actions of agent • Agent’s percept sequence Examples: By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  22. Rational Agents • An agentis an entity that perceives and acts • This course is about designing rational agents • Abstractly, an agent is a function from percept histories to actions, i.e. mapping any given percept sequence to an action. [f: P*  A] “An agent fn f can be implemented by an Agent program” • For any given class of environments and tasks, we seek the agent (or class of agents) with the best performance. “Computational limitations make perfect rationality unachievable”.  design best program for given machine resources By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  23. Vacuum-Cleaner World • Percepts:Location and contents, e.g., [A , Dirty] • Actions:Left, Right, Suck, No Op • Performance measure: An objective criterion for success of an agent's behavior • 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. By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  24. A Vacuum Cleaner rational agent can maximize its performance by • Cleaning up the dirt • Dumping it in floor • Cleaning it up again ………..so on Notion of clean floor can vary from different percepts: • Average cleanliness over time. • One agent behaves as a mediocre job all the time • Other agent performs energetically but after a long intervals “ Which is better is a deep philosophical question with far reaching implications Percept Sequence Action [A, clean] Move Right [A, dirty] Suck [B, clean] Move left [B, dirty] Suck [A, clean] ,[A, clean] Move right [A, clean] , [A, dirty] Suck By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  25. RationalAgent 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. PEAS PEAS: Performance measure, Environment, Actuators, Sensors Must first specify the setting for intelligent agent design Consider, e.g., the task of designing an automated taxi driver: • Performance measure • Environment • Actuators • Sensors By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  26. Consider, e.g., “the task of designing an automated taxi driver” • Performance measure: Safe, fast, legal, comfortable trip, maximize profits • Environment: Roads, other traffic, pedestrians, customers • Actuators: Steering wheel, accelerator, brake, signal, horn • Sensors: Cameras, sonar, speedometer, GPS, odometer, engine sensors, keyboard By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  27. PEAS Agent: Part-picking robot • Performance measure: Percentage of parts in correct bins • Environment: Conveyor belt with parts, bins • Actuators: Jointed arm and hand • Sensors: Camera, joint angle sensors Agent: Medical diagnosis system • Performance measure: Healthy patient, minimize costs, lawsuits • Environment: Patient, hospital, staff • Actuators: Screen display (questions, tests, diagnoses, treatments, referrals) • Sensors: Keyboard (entry of symptoms, findings, patient's answers) By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  28. Environment Types • Fully observable (vs. partially observable): An agent's sensors give it access to the complete state of the environment at each point in time. • Deterministic (vs. stochastic):The next state of the environment is completely determined by the current state and the action executed by the agent. (If the environment is deterministic except for the actions of other agents, then the environment is strategic. • Episodic (vs. sequential):The agent's experience is divided into atomic "episodes" (each episode consists of the agent perceiving and then performing a single action), and the choice of action in each episode depends only on the episode itself. • Static (vs. dynamic):The environment is unchanged while an agent is deliberating. (The environment is semi dynamic if the environment itself does not change with the passage of time but the agent's performance score does) • Discrete (vs. continuous):A limited number of distinct, clearly defined percepts and actions. • Single agent (vs. multiagent ): An agent operating by itself in an environment. By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  29. Examples: Environment Types Chess with Chess without Taxi driving a clock a clock Fully observable Yes Yes No Deterministic Strategic Strategic No Episodic No No No Static Semi Yes No Discrete Yes Yes No Single agent No No No • The environment type largely determines the agent design • The real world is (of course) partially observable, stochastic, sequential, dynamic, continuous, multi-agent By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  30. Structure of Agents E N V I R O N M E N T • Agent = Architecture + program • Simple Reflex Agents: SENSORS Agent What the world is like now What action I should do now? Condition Action rules ACTUATORS By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  31. SIMPLE REFLEX AGENTS select actions on the basis of current percept, ignoring rest of the percept history. • E.g. : Vacuum Agent makes decision based on its current location & whether the floor is dirty or not. • A Condition Action rule can be established • E.g : In automated driver vehicle if car in front brakes , and brakes light comes on then , agent must perform some action like to put the brake… if (car – in front is braking) initiate braking. Code for Simple Reflex Agent function sim_reflx (percept) returns an action static: rules, a set of condition – action rules // Static KB state Interpret _ input (percept) rule match(state, rules) action Action[rule] return action By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  32. FunctionTABLE-DRIVEN_AGENT(percept)returns an action static: percepts, a sequence initially empty table, a table of actions, indexed by percept sequence append percept to the end of percepts action LOOKUP(percepts, table) returnaction By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  33. Model Based Reflex Agents Environment state Sensor What the world is like now ? How the world evolves ? What my actions do ? Condition-actionrules What action I should do now Agent Actuator By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  34. To tackle partially observable environments. • Maintain internal state • Over time update state using world knowledge • How does the world change. • How do actions affect world. By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  35. A Model Based ,Goal Based Agent Environment Sensor state What The world is like now How the world evolves What it will be like if I do Action A What my actions do What action I should do now Goals Agent Actuator By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  36. Goal Based agent • The agent needs a goal to know which situations are desirable. “ Things become difficult when long sequences of actions are required to find the goal.” Typically investigated in search and planning research. • Major difference: future is taken into account • Is more flexible since knowledge is represented explicitly and can be manipulated. By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  37. A Model Based ,Utility Based Agent Environment Sensor state What The world is like now How the world evolves What it will be like if I do Action A What my actions do How happy I would be in such a state ? Utility What action I should do now Agent Actuator By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  38. Utility Based Agent (i) Certain goals can be reached in different ways. • Some are better, have a higher utility. (ii) Utility function maps a (sequence of) state(s) onto a real number. (iii) Improves on goals: • Selecting between conflicting goals • Select appropriately between several goals based on likelihood of success. By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  39. Practical Agents • 1. Software Agents • 2. Robotic Agents • Nano Agents By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  40. Foundations& Fields of AI • Different fields have contributed to AI in the form of ideas, viewpoints and techniques. • Philosophy Logic, methods of reasoning, mind as physical system foundations of learning, language, rationality • Mathematics Formal representation and proof algorithms, computation, (un)decidability, in)tractability, probability • Economics utility, decision theory • Neuroscience physical substrate for mental activity • Psychology phenomena of perception and motor control, experimental techniques • Computer Engg. building fast computers • Control theory design systems that maximize an objective function over time • Linguistics knowledge representation, grammar By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  41. State of the Art • Deep Blue defeated the reigning world chess champion Garry Kasparov in 1997 • Proved a mathematical conjecture (Robbins conjecture) unsolved for decades • No hands across America (driving autonomously 98% of the time from Pittsburgh to San Diego) • During the 1991 Gulf War, US forces deployed an AI logistics planning and scheduling program that involved up to 50,000 vehicles, cargo, and people • NASA's on-board autonomous planning program controlled the scheduling of operations for a spacecraft • Proverbsolves crossword puzzles better than most humans By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  42. What is Knowledge? • Knowledge is defined as the body of facts and principles accumulated by human kind or the act , fact or state of knowing. • Familiarity with language, concepts, procedures , rules, ideas , abstarctions , places etc. “A true justified belief is knowledge” where belief is any meaningful & coherent expression which can be manipulated . “Intelligence requires the possession of and access of knowledge. Characteristic of intelligent people is that they posses much knowledge.” “In biological organism it is strength of interconnected neurons.” “Can be represented in written text, speech , figures ,images, PL, FOPL, semantic and associative nets, conceptual dependency etc.” By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  43. Properties of Knowledge • Knowledge is voluminous • It is hard to characterize/represent • It is constantly changing, increasing or decreasing • Differs from data as it’s representation corresponds to the way it will be used. • One representation of knowledge may make solution simple ,while another difficult • Efficient representation • Must relate to real world , meaning fully • Mapping from features of world to a formal language. By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  44. AI Technique AI technique is a method that exploits knowledge that should be represented in such a way that: 1.Knowledge captures generalization(important features only) 2. Easily Understandable 3. Easily modifiable 4. Multi level implementation even if it is not totally accurate & complete To make m/c capable as humans following must be considered: • How humans store knowledge? • “ “ “ use “ ? • “ “ “ “ “ learn ? • “ “ “ “ “ “” “ “ “ reason By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  45. Flow chart of AI computing Knowledge Base (specific domain) AI Techniques Smarter computers Can Reason Make Judgment AI computers Take decision I/P queries & problems KB Inferencing o/p ,solutions with reasons By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  46. Types of Knowledge • Procedural: Compiled knowledge to perform some task. E.g: algorithm of quick sort 2. Declarative: Passive knowledge expressed as statements of facts . E.g: Personal data in data base. 3. Heuristic: Specialized knowledge to solve complex problems Require high level of experience in a specific domain 4. Meta Knowledge: Knowledge about the knowledge. E.g: A robot who plans a trip knowing the path way of a city. By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  47. Conventional versus AI Systems • Conventional problems can be described in terms of numerical variables, scalar and vector quantities. • The goal or solution can be specified in terms of well defined objective function. • Computational methods are available which provide the solution to be found and stated in numeric terms. • A conventional program has following components Program = Data Structures + Algorithm (Operations + sequence) By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  48. Conventional Vs AI Systems • For AI problems direct solution steps are not known and a final solution is found out after trying with many alternative solutions. • Intelligent activity involved in such problems can be achieved by making use of following three things: • Symbolic patterns to represent significant aspects of the problem domain. • Operations that can be performed on these symbolic patterns to generate the potential solution. • Search strategy to select a solution from amongst the possible solutions. ES = Knowledge Base + Control Strategy (Search Strategy + Heuristics) Heuristics tell order /guidance of search. By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  49. Comparison By: AnujKhanna(Asst. Prof.) www.uptunotes.com

  50. Areas of Applications • Game playing • Automated Reasoning & theorem proving • Expert System Development • Natural Language Processing & understanding • Perception (Computer Vision and Speech) • Robotics(Electrical & Electronics Engg + Mechanical+ Optics+DSP+DIP+CSE) • Machine Learning • Pattern Recognition & Object classification Expert System User Interface User I/P Inference Engine Knowledge Base By: AnujKhanna(Asst. Prof.) www.uptunotes.com

More Related