640 likes | 1.1k Views
Artificial Intelligence RT804. Prof. Shoby B Mathew Department of Information Technology Caarmel Engineering College Perunadu, Kerala. Teaching notes available at: http://www.shobymathew.com. What is Artificial Intelligence?. What is AI?.
E N D
Artificial IntelligenceRT804 Prof. Shoby B Mathew Department of Information Technology Caarmel Engineering College Perunadu, Kerala
What is AI? • A broad field that means different things to different people • Defining “artificial” is easy but no broad consensus in precise, concrete terms for “intelligence”: • exclusive province of human being? • natural phenomenon exhibited by living organisms? • an arbitrarily specified set of abilities? • other definitions??
Artificial • Artificial – usually has a negative connotation (synthetic – i.e. man made) • e.g. artificial flower : look …maybe feel no smell no
Artificial • artificial motionnatural motion planes walking trains horse automobiles • artificial light natural light electric light sunlight candles Kerosene lamp
What is Intelligence? Is there a “holistic” definition for intelligence? We might list elements of intelligence: understanding, reasoning, problem solving, learning, common sense, generalizing, inference, analogy, recall, intuition, emotion, self-awareness
What is Intelligence? • Intelligence: “ability to learn, understand and think” (Oxford dictionary) • Intelligence might be defined broadly as facility at solving problems • “Intelligence is the ability to learn, to deal with different situations, to acquire, understand, and apply knowledge and to analyze and reason.” • Varying kinds and degrees of intelligence occur in people, many animals and some machines.
What is Artificial Intelligence (AI)? • A.I. is the study of how to make computers do things at which, at the moment, people are better. • It is the science and engineering of making intelligent machines, especially intelligent computer programs • Artificial Intelligence is the science of making machines do things that would require intelligence if done by man. • Artificial Intelligence is concerned with the design of intelligence in an artificial device.
What is AI ?...contd. • The term was coined by John McCarthy in 1956. • There are two ideas in the definition. • 1. Intelligence • 2. artificial device John McCarthy (Born 1927) in 2006
AI Definitions Definitions organized into four categories The exciting new effort to make computers think … machines with minds, in the full and literal sense. [Haugeland 85]. The study of the computations that make it possible to perceive, reason, and act. [Winston, 1992] The study of how to make computers do things at which, at the moment, people are better. [Rich & Knight, 1991] The branch of computer science that is concerned with the automation of intelligent behavior. [Luger and Stubblefield, 1993]
Areas of Study Computer Science – algorithms, data representations, programs to test theories Psychology – theories of mind, memory, learning, experiments with human and animal intelligence Philosophy – mind/body problem, study of logic Linguistics – study of language (syntax, semantics) Neurology/Biology – study of the brain (both human and animal), study of memory, learning Engineering – many AI domains are in engineering disciplines Mathematics – many algorithms are mathematical in nature (neural networks, statistical approaches)
System with Intelligence • There are two possibilities: • – A system with intelligence is expected to behave as intelligently as a human • – A system with intelligence is expected to behave in the best possible manner
Turing Test • Alan Turing's 1950 article Computing Machinery and Intelligence discussed conditions for considering a machine to be intelligent. He argued that if the machine could successfully pretend to be human to a knowledgeable observer then you certainly should consider it intelligent. • He stated that a computer would deserves to be called intelligent if it could deceive a human into believing that it was human. • Considered as the basic test for intelligence
Turing Test Mathematician Alan Turing devised a test for defining artificial intelligence: an interrogator poses questions to two entities, a human and a computer If the interrogator cannot tell which is the human and which is the computer, then the computer passes the Turing Test and should be considered intelligent Turing Test – a test for machine intelligence
Eliza Person: Men are all alike. Eliza: In what way? Person: They’re always bugging us about something or other. Eliza: Can you think of a specific example? Person: Well, my boyfriend made me come here. Eliza: You’re boyfriend made you come here? Person: He says I’m depressed much of the time. Eliza: I am sorry to hear you are depressed. Person: It is true, I am unhappy. Eliza: Do you think coming here will help you not to be unhappy? Person: I need some help, that much seems certain. Eliza: What would it mean to you if you got some help? Person: Perhaps I could learn to get along with my mother. Eliza: Tell me more about your family. Eliza consists of a series of rules (if-then statements) sample syntactic manipulations: <X> me <Y> <X> you <Y>? I like <Y> Why do you like <Y>? <X> are like <Y> In what way? <X> {mother | father | brother | sister} Tell me more about your family <X> Can you think of a specific example? Eliza had no understanding of the text input or its own responses try a non-sensical sentence, you will get a non-sensical response!
What can AI systems do? • Today’s AI systems have been able to achieve limited success in some of these tasks. • Face recognition (Computer vision ) • Vehicles that are mostly autonomous ( Robotics ) • Simple machine translation (Natural language processing) • Medical diagnosis in a narrow domain (Expert systems ) • Recognizing several thousand words continuous speech (Speech Understanding ) • AI systems can play at the Grand Master level in chess (Games)
What can AI systems NOT do yet? • Understand natural language robustly (e.g., read and understand articles in a newspaper) • Surf the web • Interpret an arbitrary visual scene • Learn a natural language
Applications of AI Computer beats human in a chess game. Computer-human conversation using speech recognition. Expert system controls a spacecraft. Robot can walk on stairs and hold a cup of water. Language translation for webpages. Home appliances use fuzzy logic ......
Applications of AI Search engines Science Medicine/ Diagnosis Labor Appliances What else? Games
Some Task Domains of AI • Mundane tasks • Perception (Vision, Speech) • Natural language (Understanding, Generation, Translation) • Commonsense reasoning • Robot control • Formal Tasks • Games (Chess, checkers) • Mathematics (Geometry, logic, integral calculus) • Expert tasks • Engineering (design, fault finding, manufacturing planning) • Scientific analysis • Medical diagnosis • Financial analysis
AI Problems Mundane tasks correspond to the following AI problems areas: • Planning : • Vision : • Robotics: • Natural Language: The ability to decide on a good sequence of actions to achieve our goals The ability to make sense of what we see The ability to move and act in the world, possibly responding to new perceptions The ability to communicate with others in any human language Mundane tasks are generally much harder to automate
To Build an Intelligent System • Why? To solve a particular problem • We need to do four things • Define the problem precisely • Analyze the problem • Isolate and represent the task knowledge that is necessary to solve the problem • Choose the best problem-solving techniques and apply it to the particular problem
Problem Solving through AI • Problem: • It is the question which is to be solved • For solving a problem it needs to be precisely defined • Problem definition means, defining the start goal, goal state, other valid states and transitions
Problem Solving through AI • The method of solving problem through AI involves the process of defining the search space, deciding start and goal states and then finding the path from start state to goal state through search space
Production rules • The movement from start state to goal state is guided by set of rules specifically designed for that particular problem (sometimes called production rules) • The production rules are nothing but valid moves described by the problems
Search Space & Search • Search space: It is the complete set of states including start and goal states, where the answer of the problem is to be searched • Search: It is the process of finding the solution in search space. The input to search space algorithm is problem and output is solution in form of action sequences
Well defined problem • A problem description has three major components. Initial state, final state, space including transition function or path function. • A path cost function assigns some numeric value to each path that indicates the goodness of that path. • Sometimes a problem may have additional component in form of heuristic information
Solution of the problem • A solution of the problem is a path from initial state to goal state. The movement from start states to goal states is guided by transition rules. • Among all the solutions, whichever solution has least path cost is called optimal solution
Method of solving problems through AI techniques • It involves the process of defining the search space, deciding about start and goal state and then finding a path from start state to goal state through search space • The search techniques are methods which are used to find a way from start to goal state
Defining the problem as a state space search • Problem solving = Searching for a goal state • The state space representation forms the basis of most of the AI problems • Search is a very important process in the solution of hard problems for which no more direct techniques are available.
State Space Search • Define a state space that contains all the possible configurations of the relevant objects. 2.Specify the initial states. 3.Specify the goal states. 4.Specify a set of rules: - What are unstated assumptions? - How general should the rules be? - How much knowledge for solutions should be in the rules?
Famous Problems for Illustrating AI Concepts • Water Jug Problem • Chess Problem • Tic-Tac-Toe • 8-Puzzle Problem • 8-Queens Problem • Tower of Hanoi Problem • Traveling Salesperson Problem • Magic Square • Monkey and Bananas problem • Missionaries and Cannibals problem • Cryptarithmetic
State Space Search: Water Jug Problem “You are given two jugs, a 4-gallon (litre) one and a 3-gallon (litre) one. Neither has any measuring markers on it. There is a pump (tap) that can be used to fill the jugs with water. How can you get exactly 2 litres of water into 4-litre jug.”
State Space Search: Water Jug Problem • State: (x, y) i.e Where X is gallons of water in 4 gallon jug & y is gallons of water in 3 gallon jug • x = 0, 1, 2, 3, or 4 y = 0, 1, 2, 3 • Start state: (0, 0). • Goal state: (2, n) for any n. • Attempting to end up in a goal state.
Production rules for Water Jug Problem • (x, y) (4, y) if x 4 2. (x, y) (x, 3) if y 3 3. (x, y) (x d, y) if x 0 4. (x, y) (x, y d) if y 0
Production rules for Water Jug Problem 5. (x, y) (0, y) if x 0 6. (x, y) (x, 0) if y 0 7. (x, y) (4, y (4 x)) if x y 4, y 0 8. (x, y) (x (3 y), 3) if x y 3, x 0
Production rules for Water Jug Problem 9. (x, y) (x y, 0) if x y 4, y 0 10. (x, y) (0, x y) if x y 3, x 0 11. (0, 2) (2, 0) 12. (2, y) (0, y)
State Space Search: Water Jug Problem • Current state = (0, 0) 2.Loop until reaching the goal state (2, 0) -Apply a rule whose left side matches the current state - Set the new current state to be the resulting state (0, 0) (0, 3) (3, 0) (3, 3) (4, 2) (0, 2) (2, 0)
State Space Search: Water Jug Problem The role of the condition in the left side of a rule restrict the application of the rule more efficient 1. (x, y) (4, y) if x 4 2. (x, y) (x, 3) if y 3
State Space Search: Water Jug Problem Special-purpose rules to capture special-case knowledge that can be used at some stage in solving a problem 11. (0, 2) (2, 0) 12. (2, y) (0, y)
Partial Search Tree of Water Jug Problem (0, 0) (4, 0) (0, 3) (4, 3) (0, 0) (1, 3) (4, 3) (0, 0) (3, 0)
Formal Description of the Problem: Summary • Define a state space that contains all the possible configurations of the relevant objects. • Specify one or more states within that space that describe possible situations from which the problem solving process may start (initial state) • Specify one or more states that would be acceptable as solutions to the problem. (goal states) • Specify a set of rules that describe the actions (operations) available.
Problem Solving: Chess • Game playing • Game playing is considered an intelligent human activity. • Games of perfect information are really just search problems