23 views

Uploaded by vishakha_18

ppt of AI

- AI & Expert Sys.pptx
- cooperation-2-min
- annotatedbibliography
- p78 lesson 4 turing test activity
- s41039-017-0062-8
- Finalsol Sample[1]
- INTRODUCING MACHINE LEARNING FROM AN AI PERSPECTIVE.pdf
- Artificial Intelligence
- Warlock of the Magus World 1 - 100 (Arc 1 — Transmigration)
- Human Investment Advisory, Inc. Announces Global Strategic Alliance with Acquired Insights, Inc.
- AI-2015
- p119 Artificial Intellegent
- Ais
- History Ai
- 10.1.1.43.2705
- Mis 7
- Okonkwo Blessing Updated Cv.doc
- Chapter 02 Student
- Basic Math Assignment Da Siap.
- Makalah3 b.inggris Nurfitriani

You are on page 1of 52

1.A.1 Introduction to AI and AI techniques 1.A.2 Task Domain of AI 1.A.3 State Space and its various examples 1.A.4 Production System 1.A.5 Control Strategies (BFS and DFS) 1.A.6 1.A.7 1.A.8

What is AI?

Intelligence: Oxford Dictionary meaning : ability to learn,

understand and think

at the moment people do better.

Examples: 1. Recognition (Speech, Smell, Face, Object) 2. Intuition 3. Inferencing 4. Learning New Skills 5. Decision Making 6. Abstract thinking

What is AI?

1. Thinking humanly

3. Thinking rationally

2. Acting humanly

4. Acting rationally

Not content to have a program correctly solving a problem.

More concerned with comparing its reasoning steps to traces of human solving the same problem.

mind: cognitive science.

Done by Alan Turing (1912-1954) Computing Machinery and Intelligence (1950) 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.

Human

AI System

Aristotle was one of the first to attempt to codify right

thinking, i.e., irrefutable reasoning processes.

representing and reasoning with all kinds of things in the world.

Obstacles:

- Informal knowledge representation. - Computational complexity and resources.

4. Acting Rationally

Acting so as to achieve ones goals, given ones beliefs. Does not necessarily involve thinking. Advantages: More general than the laws of thought approach. More amenable to scientific development than human

based approaches.

Task Domains of AI

Mundane Tasks: Perception Vision Speech Natural Languages Understanding Generation Translation Common sense reasoning Robot Control Formal Tasks Games : chess, checkers etc Mathematics: Geometry, logic, Proving properties of programs Expert Tasks: Engineering ( Design, Fault finding, Manufacturing planning) Scientific Analysis Medical Diagnosis Financial Analysis

AI Technique

Intelligence requires Knowledge Knowledge possesses less desirable properties such as: Voluminous Hard to characterize accurately Constantly changing Differs from data that can be used AI technique is a method that exploits knowledge that should be represented in such a way that: Knowledge captures generalization It can be understood by people who must provide it It can be easily modified to correct errors. It can be used in variety of situations

Application 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 web pages. Home appliances use fuzzy logic. And so on...

Programs are presented Series increase Their complexity Use of generalization Clarity of their knowledge Extensibility of their approach

X o

Data Structures: Board: 9 element vector representing the board, with 1-9 for each square. An element contains the value 0 if it is blank, 1 if it is filled by X, or 2 if it is filled with a O Move-table: A large vector of 19,683 elements ( 3^9), each element is 9-element vector.

Tic-Tac-Toe cont..

Algorithm: 1. View the vector as a ternary number. Convert it to a decimal number. 2. Use the computed number as an index into MoveTable and access the vector stored there. 3. Set the new board to that vector. Advantage: 1. This program is very efficient in time. Limitation: 1. A lot of space to store the Move-Table. 2. A lot of work to specify all the entries in the MoveTable. 3. Difficult to extend.

State Space

To build a system for solving a problem: 1. Define the problem precisely 2. Analyze the problem 3. Isolate and represent the task knowledge that is necessary to solve the problem 4. Choose the best problem-solving techniques and apply it to the particular problem. Here we concentrate on first step only.

State Space

A state is representation of elements at a given moment. A problem is defined by its states and their relations. Among all possible states, there are two special states called: 1. Initial state: start point 2. Goal State: or final state Here we also need a successor function (production rules) for state change. It moves one state to another state. A successor function is description of possible actions; a set of operators. A state space is set of all states reachable from initial state. A state space forms a graph in which nodes are states and arcs between nodes are actions. In state space, A path is sequence of states connected by sequence of actions.

The state space representation forms the basis of most of the AI methods. Its structure corresponds to the structure of problem solving in two important ways: 1. It allows for a formal definition of a problem as the need to convert some given situation into some desired situation using a set of permissible operations. 2. It permits us to define the process of solving a particular problem as a combination of known techniques (each represented as a rule defining a single step in the space) and search, the general technique of exploring the space to try to find some path from current state to a goal state.

Examples

1. 2. 3. 4. 5. 6. 7. Playing Chess Water Jug Problem Missionaries and Cannibals Problem 8 Puzzle Problem Tower of Hanoi problem Travelling Salesman Problem Monkeys and Bananas Problem

To build a program that could play chess, state space of the problem should be specified. State space includes: 1. Starting position can be described as an 8X8 array where each position contains a symbol for appropriate piece. 2. Goal can be the check mate position where opponents kings is under attack and does not have any legal moves.

3. Production rules ( here called Legal moves) provide the way of getting

from initial state to a goal state. They can be described easily as a set of rules consisting of two parts: A left side that serves as a pattern to be matched against the current board position. And a right side that describes the change to be made to reflect the move

White pawn at Square( file e, rank 2) AND Square( File e, rank 3) is empty AND Square(file e, rank 4) is empty

move the pawn from Square( file e, rank 2) to Square( file e, rank 4).

However, this approach leads to large number of rules 10120 board positions. Using so many rules poses problems such as: No person could ever supply a complete set of such rules. No program could easily handle all those rules. Just storing so many rules poses serious difficulties. Here we need to write more general rules as much as possible. For example:

The state space for this problem can be described as the set of ordered pairs of integers (x, y) such that x = 0, 1,2, 3 or 4 and y = 0,1,2 or 3; x represents the number of gallons of water in the 4-gallon jug and y represents the quantity of water in 3-gallon jug The start state is (0,0) The goal state is (2,n)

SN 1 2 3 4 5 6 7 8 9 10 11 12 Current state (x,y) if x < 4 (x,y) if y <3 (x,y) if x > 0 (x,y) if y > 0 (x,y) if x>0 (x,y) if y >0 (x,y) if x+y >= 4 and y >0 (x, y) if x+y >= 3 and x>0 (x, y) if x+y <=4 and y>0 (x, y) if x+y <= 3 and x>0 (0,2) (2,y) Next State (4,y) (x,3) (x-d, y) (x, y-d) (0, y) (x,0) (4, y-(4-x)) (x-(3-y), 3) (x+y, 0) (0, x+y) (2,0) (0,y) Description Fill the 4 gallon jug Fill the 3 gallon jug Pour some water out of the 4 gallon jug Pour some water out of the 3-gallon jug Empty the 4 gallon jug Empty the 3 gallon jug on the ground Pour water from the 3 gallon jug into the 4 gallon jug until the 4-gallon jug is full Pour water from the 4-gallon jug into the 3gallon jug until the 3-gallon jug is full Pour all the water from the 3-gallon jug into the 4-gallon jug Pour all the water from the 4-gallon jug into the 3-gallon jug Pour the 2 gallons from 3-gallon jug into the 4-gallon jug Empty the 2 gallons in the 4-gallon jug on the ground

(0,0)

(4,0)

(0,3)

(4,3)

(0,0)

(1,3)

(4,3)

(0,0)

(3,0)

Required a control structure that loops through a simple cycle in which some rule whose left side matches the current state is chosen, the appropriate change to the state is made as described in the corresponding right side, and the resulting state is checked to see if it corresponds to goal state. One solution to the water jug problem as shown in table. Shortest such sequence will have a impact on the choice of appropriate mechanism to guide the search for solution.

Gallons in the 4-gallon jug Gallons in the 3-gallon jug Rule applied

0 0 3 3 4 0 2

0 3 0 3 2 2 0

2 9 2 7 5 or 12 9 0r 11

The state space for this problem can be described as follows: Constraints: The boat can carry at most 2 people and at any bank the number of cannibals should not exceed the number of missionaries

State : <#M, #C, P> #M = Number of missionaries on left bank #C = Number of cannibals on left bank P = Position of the boat Starting State = <3, 3, L> Goal State = < 0, 0, R > Production Rules (or Operations): 1. mm = Two missionaries take boat 2. m = One missionary takes boat 3. cc = Two cannibals take boat 4. c = One cannibal takes boat 5. mc = One missionary and one cannibal takes boat

The state space for this problem can be described as configuration 8 tiles on the board. The start state can be any configuration. For example one of the configuration is shown in figure. The goal state is a configuration in which tiles must be arranged in specific order.

Constraint: The Blank can be move within board. Production Rules: (operations) 1. Blank moves LEFT. 2. Blank moves RIGHT. 3. Blank moves UP. 4. Blank moves DOWN.

This puzzle involves a set of rings of different size (shown in different color) that can be placed on three different pegs. Puzzle start with start state as shown in figure. Goal of this puzzle to move all rings from first peg to third peg. Constraint: Only top ring of the peg can be moved and it may only be placed on bigger ring or on any empty peg.

A simple motion causing and systematic control structure could solve this problem. Simply explore all possible paths in the tree and return the shortest path. If there are N cities, then number of different paths among them is 1.2.(N-1) or (N-1)! Time to examine single path is proportional to N. Total time required to perform search is proportional to N! For 10 cities, 10! = 3,628,800 This phenomenon is called Combinatorial explosion.

TSP cont

Algorithm: 1. Begin generating complete paths, keeping track of the shortest path found so far. 2. Give up exploring any path as soon as its partial length becomes greater than the shortest path found so far. Using this algorithm, we are guaranteed to find the shortest path. It still requires exponential time. The time it saves depends on the order in which paths are explored.

1. 2. 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.

3. 4.

Production Systems

A production system consists of: 1. A set of rules, each consisting of a left side that determines the applicability of the rule and a right side that describes the operation to be performed if that rule is applied. 2. One or more knowledgebase/databases that contain whatever information is appropriate for the particular task. Some parts of the database may be permanent, while other parts of it may pertain only to the solution of the current problem. 3. A control strategy that specifies the order in which the rules will be compared to the database and a way of resolving the conflicts that arise when several rules match at once. 4. A rule applier

In order to solve a problem: We must first reduce it to one for which a precise statement can be given. This can be done by defining the problems state space ( start and goal states) and a set of operators for moving that space. The problem can then be solved by searching for a path through the space from an initial state to a goal state. The process of solving the problem can usefully be modeled as a production system.

Control Strategies

How to decide which rule to apply next during the process of searching for a solution to a problem? The two characteristics of good control strategy are that 1. It should cause motion. 2. It should be systematic. Two important control strategies are discussed here. 1. BFS (Breadth First Search) 2. DFS (Depth First Search)

1. Create a variable called NODE-LIST and set it to initial state 2. Until a goal state is found or NODE-LIST is empty do a. Remove the first element from NODE-LIST and call it E. If NODE-LIST was empty, quit b. For each way that each rule can match the state described in E do: i. Apply the rule to generate a new state ii. If the new state is a goal state, quit and return this state iii. Otherwise, add the new state to the end of NODELIST

1. 2. If the initial state is a goal state, quit and return success Otherwise, do the following until success or failure is signaled: a. Generate a successor, E, of initial state. If there are no more successors, signal failure. b. Call Depth-First Search, with E as the initial state c. If success is returned, signal success. Otherwise continue in this loop.

BFS: BFS will not get trapped exploring a blind alley. If there is a solution, BFS is guaranteed to find it. If there are multiple solutions, then a minimal solution will be found. DFS: DFS requires less memory since only the nodes on the current path are stored. By chance, DFS may find a solution without examining much of the search space at all.

Problem Characteristics

In order to choose the most appropriate method for a particular problem, it is necessary to analyze the problem along several key dimensions: 1. Is the problem decomposable into a set of independent smaller or easier sub-problems? 2. Can solution steps be ignored or at least undone if they prove unwise? 3. Is the problems universe predictable? 4. Is a good solution to the problem obvious without comparison to all other possible solutions? 5. Is the desired solution a state of the world or a path to a state? 6. Is a large amount of knowledge absolutely required to solve the problem or is knowledge important only to constrain the search? 7. Amount of interaction between the computer and a person required?

Whether the problem can be decomposed into smaller problems? Using the technique of problem decomposition, we can often solve very large problems easily. Example : In Blocks World Problem, following operators are available: 1.CLEAR(x) -> ON(x, Table) [put block X on table] 2.CLEAR(x) and CLEAR(y) -> ON(x, y) [ put block x on block y]

Goal: ON(B,C) and ON(A,B) Start: ON(C,A)

ON(B,C) and ON(A,B) ON(B,C) ON(A,B)

C A

A B C

ON(B,C)

CLEAR(A) CLEAR(A)

ON(A,B) ON(A,B)

Suppose we are trying to prove a math theorem. We can prove a lemma. If we find the lemma is not of any help, we can simply ignore some steps and continue. Important classes of problems: 1. Ignorable : Theorem proving; Ignorable problems can be solved using a simple control structure that never backtracks 2. Recoverable : 8-puzzle; Recoverable problems can be solved by a slightly more complicated control strategy that does sometimes make mistakes 3. Irrecoverable : Chess; Irrecoverable problems will need to be solved by systems that expends a great deal of effort making each decision since decision must be final. The recoverability of a problem plays an important role in determining the complexity of the control structure necessary for the problems solution.

3. Is the universe Predictable? Important classes of problems: 1. Certain Outcome: Example: Water Jug Problem, 8-puzzle For solving certain outcome problems, open loop approach ( without feedback) will work fine. 2. Uncertain Outcome: Example: Bridge or controlling a robot arm); For uncertain-outcome problems, planning can at best generate a sequence of operators that has a good probability of leading to a solution. We need to allow for a process of plan revision to take place.

Important classes of problems according to this criteria: 1. Any path problems: can often be solved in a reasonable amount of time by using heuristics that suggest good paths to explore. Example: Water Jug Problem. 2. Best path problems are computationally harder. Example: Travelling Salesman Problem.

Consider the following examples: 1. Natural Language Processing: Finding a consistent interpretation for the sentence The bank president ate a dish of pasta salad with the fork. We need to find the interpretation but not the record of the processing. Here solution is a state. 2. Water Jug: Here it is not sufficient to report that we have solved , but the path that we found to the state (2,0). Thus the a statement of a solution to this problem must be a sequence of operations ( Plan) that produces the final state.

Important classes of problems according to this criteria: 1. Small amount of knowledge is required to constrain the search for a solution. Example: Chess Playing 2. Large amount of knowledge is required even to be able to recognize a solution. Example: Newspaper story understanding Consider a problem of scanning daily newspapers to decide which are supporting the political party Congress and which are supporting the other party BJP in some election. We need lots of knowledge to answer such questions as: The names of the candidates in each party The facts that if the major thing you want to see done is have taxes lowered, you are probably supporting the BJP The fact that if the major thing you want to see done is improved education for minority students, you are probably supporting the Congress.

The programs require intermediate interaction with people for additional inputs and to provided reassurance to the user. There are two types of programs: Solitary Conversational Decision on using one of these approaches will be important in the choice of problem solving method.

Problem Classification

There are several broad classes into which the problems fall. These classes can each be associated with generic control strategy that is appropriate for solving the problems: 1. Classification : Example - Medical diagnostics, diagnosis of faults in mechanical devices 2. Propose and Refine: Example - Design and planning

Production systems, like problems, can be described by a set of characteristics that shed some light on how they can easily be implemented. We need to know that, what relationships are there between problem types and the types of production systems best suited to solving the problems? Classes of Production systems: Monotonic Production System: the application of a rule never prevents the later application of another rule that could also have been applied at the time the first rule was selected. Non-Monotonic Production system Partially commutative Production system: property that if application of a particular sequence of rules transforms state x to state y, then permutation of those rules allowable, also transforms state x into state y. Commutative Production system

1. Monotonic Production Systems are such production system in which the application of a rule never prevents the later application of another rule that could also have been applied at the time the first rule was applied. Here rules are independent. 2. Partially Commutative production system has a property that if the application of a particular sequence of rules transform state x into state y, then any permutation of those rules that is allowable, also transforms state x into state y. 3. Commutative production system is a production system that is both monotonic and partially commutative.

4. Partially Commutative and Monotonic: These production systems are useful for solving ignorable problems. Example: Theorem Proving They can be implemented without the ability to backtrack to previous states when it is discovered that an incorrect path has been followed. This often results in a considerable increase in efficiency, particularly because since the database will never have to be restored, It is not necessary to keep track of where in the search process every change was made. They are good for problems where things do not change; new things get created. 5. Partially Commutative and Non-Monotonic: Useful for problems in which changes occur but can be reversed and in which order of operations is not critical. Example: Robot Navigation, 8-puzzle, blocks world Suppose the robot has the following ops: go North (N), go East (E), go South (S), go West (W). To reach its goal, it does not matter whether the robot executes the N-N-E or N-E-N.

6. Non-Partially Commutative Problems in which irreversible change occurs. Example: chemical synthesis The operations can be :Add chemical x to the pot, Change the temperature to t degrees. These ops may cause irreversible changes to the potion being brewed. The order in which they are performed can be very important in determining the final output. (X + Y) + Z is not the same as (Z + Y) + X Non partially commutative production systems are less likely to produce the same node many times in search process. When dealing with ones that describe irreversible processes, it is partially important to make correct decisions the first time, although if the universe is predictable, planning can be used to make that less important.

Monotonic

Bridge

Thanks

- AI & Expert Sys.pptxUploaded byNeha
- cooperation-2-minUploaded byapi-460425855
- annotatedbibliographyUploaded byapi-267792564
- p78 lesson 4 turing test activityUploaded byapi-248401265
- s41039-017-0062-8Uploaded bybakiz89
- Finalsol Sample[1]Uploaded byGobara Dhan
- INTRODUCING MACHINE LEARNING FROM AN AI PERSPECTIVE.pdfUploaded byravigobi
- Artificial IntelligenceUploaded byzan_race_football
- Warlock of the Magus World 1 - 100 (Arc 1 — Transmigration)Uploaded byLui89
- Human Investment Advisory, Inc. Announces Global Strategic Alliance with Acquired Insights, Inc.Uploaded byPR.com
- AI-2015Uploaded byCS & IT
- p119 Artificial IntellegentUploaded byjnanesh582
- AisUploaded byCS & IT
- History AiUploaded byprang_558
- 10.1.1.43.2705Uploaded byManuel Bedia
- Mis 7Uploaded byabhi7219
- Okonkwo Blessing Updated Cv.docUploaded byFredview
- Chapter 02 StudentUploaded byCaleb Aaron Ortega
- Basic Math Assignment Da Siap.Uploaded byMohamad Firdaus
- Makalah3 b.inggris NurfitrianiUploaded byUmi Nur Hanifah
- Win HunterUploaded byhosd2015
- Time Table -Monsoon 2018V8Uploaded byranjan_prashant52
- units 510Uploaded byapi-385487853
- computers 6 outlineUploaded byapi-258601843
- AI Index 2018 Annual ReportUploaded byGerman Marino
- PassiontoLearn.com - Power Thoughts_043Uploaded bykwoolsey4
- Phase I Prototype BriefingUploaded byJovanni Ivan Jabat
- Impact of AI on EmployementUploaded byDhruv Seth
- AI_1Uploaded byWahyu Wiratama
- ULB ConferenceUploaded byelena novoa

- Organizational Behavior Case StudyUploaded byCoulibaly Younoussou
- cost-minUploaded byMudassir Ali
- Questions ExamUploaded bykirin19
- J_series_manual.pdfUploaded byAdrian Niżnikowski
- Emcee Script for GraduationUploaded byJanice Fuerzas Balmera Curag
- POWER OPTIMIZED 4-BIT BCD ADDER USING GDI TECHNIQUEUploaded byijaert
- Vebr to Be Present and PastUploaded byluis
- Research 1Uploaded byJuliana Molina
- tokios tokelesUploaded byIna
- ENDERECAMENTO PLC5Uploaded bysemefeito_nofx
- Gender Check Catalogue MilevskaUploaded bySuzana Milevska
- 1#a Comparative Study of PI Fuzzy and ANN Controllers for Chopper Fed DC Drive With Embedded Systems ApproachUploaded byalialibaba
- umi-umd-2795Uploaded byMuhammad Umar Iqtidar
- epotential staff bookletUploaded byapi-51462131
- MC2MethodUploaded bysirgascone
- Simon Kingsnorth-Digital Marketing Strategy_ an Integrated Approach to Online Marketing-Kogan Page (2016)Uploaded byMalik Akbar
- The Human Subject_LesageUploaded byTeddy4321
- (6) Using QuotationsUploaded byMohd Al Qassam
- IdealsUploaded bybigkev73
- ccms17.pdfUploaded byvikasoza
- MATLAB 2 - Plotting GraphsUploaded byThe_Kop7518
- Rich Text Editor FileUploaded byroughnot
- SocializationUploaded byerwinkae
- Blockbuster Inc.Uploaded byjfalmeida
- Capitol UniversityUploaded byBilly Madayag
- Artemus SpellsUploaded byMichael Anderson
- JarqueUploaded byDamien Dementia
- The Problem of Population and Growth a Review of the Literature From Malthus to Contemporary ModelsUploaded byJuan Pedreros
- Moral Values In EducationUploaded byInternational Organization of Scientific Research (IOSR)
- Ev 32921927Uploaded byAnonymous 7VPPkWS8O