artificial intelligence

43
Artificial Intelligence

Upload: harry

Post on 03-Nov-2014

45 views

Category:

Documents


3 download

DESCRIPTION

Artificial Intelligence Notes

TRANSCRIPT

Page 1: Artificial Intelligence

Artificial Intelligence

Page 2: Artificial Intelligence

Module1

Introduction, Definition, AI application Areas, problems and problem spaces, Ex. Problems, Problem characteristics. Problem solving by searching, search strategies- Breadth First search, Depth first Search, Uniform Cost search, Depth- Limited Search, Bi-Directional Search- Constraint Satisfaction search.

Page 3: Artificial Intelligence

Definitions of AI

There are various definitions given

by experts in describing what is Artificial Intelligence

Page 4: Artificial Intelligence

Definitions of AI (contd.)

AI is the part (branch) of Computer Science concerned with designing Intelligent Computer Systems ie the systems that exhibits characteristics we associate with intelligence in human behavior.

Page 5: Artificial Intelligence

Definitions of AI (contd.)

AI is the branch of Computer Science dealing

with symbolic non-algorithmic methods of problem solving.

AI is the study of how to make computers do

things better than human being.

Page 6: Artificial Intelligence

Definitions of AI (contd.)

AI is the ability of a machine to complement facts, to learn new facts, retain facts in memory, retrieve the facts at the right time, use the facts for problem solving and reach the desired goal.

Page 7: Artificial Intelligence

So Far????

Experts have designed many computer systems that can diagnose diseases, plan the synthesis of complex organic chemical components, solve differential equations in symbolic form, analyze electronic circuits, understand limited amount of speech etc. These systems are said to have some sort of Artificial Intelligence.

Page 8: Artificial Intelligence

Examples of AI problems(Application Areas)

1.Expert Consulting Systems

A key problem in the development of Expert Consulting System is how to represent and use the knowledge that human experts in these subjects obviously posses and use.

This problem is more difficult by the fact that the expert knowledge in any important field is imprecise and uncertain.

Page 9: Artificial Intelligence

Examples of AI problems (contd.)

(Application Areas)2. Theorem Proving

Finding proof of a mathematical theorem requires following intelligence.

Requires the ability to make deductions from hypothesis.

It demands intuitive scales such as guessing which path should be proved first in order to help proving the theorem.

Page 10: Artificial Intelligence

Examples of AI problems (contd.)

(Application Areas)

It also requires judgments to guess accurately about which previously proven theorems in a subject area will be useful in the present proof.

Also sometimes it is needed to break the main problem into sub-problems to work on independently.

Note:

Several automatic theorem proving programs have been developed that possess some of the above skills to a limited degree.

Page 11: Artificial Intelligence

Examples of AI problems(contd.)

(Application Areas) 3. Robotics

It deals with the problems of controlling the physical actions of a mobile Robot.

4. Automatic Programming

In automatic programming, a system takes in a high level description of what program is to accomplish and produce a program.

Page 12: Artificial Intelligence

Examples of AI problems (contd.)

(Application Areas) 5. Combinatorial and Scheduling Problems

When there are several paths towards a solution stage, it appears that computers could perform well at them, simply by being fast at exposing a large number of solution paths and then selecting the best.

But solving these types of problems may generate a combinatorial explosion of probabilities that exhausts the capacities of even large computers.

Page 13: Artificial Intelligence

Examples of AI problems (contd.)

(Application Areas)6. Perceptional Problems

Computers are made to see their surroundings by fitting T.V inputs. Also they are made to hear speaking voices by providing with microphone inputs. But it requires processing of large base knowledge about the things being perceived.

Page 14: Artificial Intelligence

Examples of AI problems (contd.)

(Application Areas)7. Natural Language Processor

This field concerned with the efforts of making computers to understand spoken and written languages. In order to understand sentences about a topic, it is necessary not only a lot about the vocabulary and grammar, but also a good deal about the topic so that unstated assumptions can be recognized.

Page 15: Artificial Intelligence

Simple Definitions

• Data

• Data Processing

• Information

• Knowledge

• Knowledge base

Page 16: Artificial Intelligence

Simple Definitions• Data

Data are the facts and figures about a particular activity.

• Data ProcessingThe process of collecting all the required data together to produce meaningful information.

• InformationInformation is obtained by processing the data into meaningful form

• KnowledgeIt is structured representation of all the facts of an AI problem

• Knowledge baseThe facts or assertions about the problem domain.

• Data baseThe storage medium for the state variables.

Page 17: Artificial Intelligence

Problem Solving, Problem Spaces and Problem Characteristics

Page 18: Artificial Intelligence

Problem Solving

Problem Solving is a process or procedure used to find out the solution to a specific problem. To build a system to solve a particular problem we need to do 4 things.

Page 19: Artificial Intelligence

Problem Solving- steps

1. Define the problem precisely

This definition must include precise specifications of what the initial situations will be as well as what the final situations constitute acceptable solution to the problem.

Page 20: Artificial Intelligence

Problem Solving - steps

2. Analyze the Problem

A few important features of the problem can help in the selection of various possible techniques for solving the problem.

Page 21: Artificial Intelligence

Problem Solving - steps

3. Knowledge Representation.

Isolate and represent the knowledge that is necessary to solve the problem.

4. Best Techniques.

Choose the best problem solving technique and apply it to the particular problem.

Page 22: Artificial Intelligence

State Space Representation State Space Representation is a structured

representation of an unstructured problem. It consists of

1. Initial States2. Final States (Goal State)3. Intermediate states4. Operators, which indicates action to be performed for

making the changes in the initial states to reach the goal state.

5. A complete knowledge of the problem which is needed for applying the operators to make a state change.

Page 23: Artificial Intelligence

Solution Stages

1. Assumptions

2. Solution steps

3. State Space Representations Initial state Final state Operators that can be applied Abbreviations State space representation of the given problem Operators and Conditions.

Page 24: Artificial Intelligence

Examples

Q1 There are 2 water jugs, one of 3 gallons and other of 4 gallons capacity and both of them having no markers. There is a pump that can be used to fill the jugs with water. Discuss how exactly 2 gallons of water can be filled into 4 gallons of jug by employing the state space representations.

Page 25: Artificial Intelligence

1. Assumptions

In order to solve the above problem we can

make the following assumptions without affecting the problem.

1. We can fill the jugs with the help of a pump.

2. We can pour water from any jug to the ground.

3. We can transfer water from one jug to the other.

4. No external measuring devices are available.

Page 26: Artificial Intelligence

2. Solution Steps

We can list the steps that may be followed to reach the goal state.

1. Fill the 3 gallon jug with water2. Pour the water from 3 gallon jug to 4 gallon jug.3. Again fill the 3 gallon jug with water4. Pour the water carefully from 3 gallon jug to 4 gallon

jug such that it is just filled.5. Empty the 4 gallon jug6. Transfer the water from 3 gallon jug to 4 gallon jug.7. Stop.

Page 27: Artificial Intelligence

State Space Representation 1. Initial & Final States

Let the Quantity of the water present in the jug represent the state.

State = (Water in 4 G jug, Water in 3 G jug)

Initial State = (0 , 0)

Final State = (2 , 0)

Page 28: Artificial Intelligence

State Space Representation 2.Operators

Let us define the following 4 operators.

1. FILL (jug): where jug = 3 gallon or 4 gallon, fill the jug fully with water.

2. EMPTY (jug): where jug = 3 gallon or 4 gallon, empty the jug by pouring the water to ground.

3. POUR (jug1, jug2): pour the water from jug1 to jug 2 until it is just filled

4. TRANSFER (jug1, jug2): pour the water from jug1 to jug 2 completely.

Page 29: Artificial Intelligence

State Space Representation 3. Abbreviations

G3 3 Gallon Jug

G4 4 Gallon Jug

Page 30: Artificial Intelligence

4.State Space Representation

State No. Operator State(G4,G3)

• 0 (Initial) --------- (0, 0)• 1 FILL (G3) (0, 3)• 2 TRANSFER (G3, G4) (3, 0)• 3 FILL (G3) (3, 3)• 4 POUR (G3, G4) (4, 2)• 5 EMPTY (G4) (0, 2)• 6 (Final) TRANSFER (G3,G4) (2, 0)

Page 31: Artificial Intelligence

State Space Representation 5.Operators and Conditions

Operators

FILL (G3) :FILL (G4) :EMPTY (G4) :

TRANSFER (G3,G4) :

POUR (G3, G4) :

Conditions

G3 was not fullG4 was not fullG4 was not empty

G3 was not empty & G4 was not full

G3 was not empty& G4 was not full

Page 32: Artificial Intelligence

Examples

Q2. A man arrives at the bank of a river with his pets: Tiger !!, cow and a bundle of grass. A small boat is available in bank A which can carry the man and any one of the 3 items namely tiger, cow and grass. If the tiger and the cow are left alone on the bank without the man being there, the tiger would kill and eat the cow. If the cow and grass are left, the cow would eat the grass. Indicate how the man can cross the river from bank A to bank B using the boat and without loosing any of the three.

Page 33: Artificial Intelligence

Examples

Q3. Three priests and 3 cannibals (man eaters) arrived on bank A of a river. All of them want to cross the river to reach bank B. A small boat is available on bank A which can carry only 2 persons at a time. The condition is that if the number of cannibals are more than the number of priests on any bank, the cannibals will attack the priests and eat them. Indicate how the priests and the cannibals cross the river such that none of the priest is eaten by the cannibals. Write the state space representation.

Page 34: Artificial Intelligence

Problem Characteristics

• Divisibility

• Ignoring Solution Steps

• Irrecoverable solution steps

• Predictability of problem

• Absolute and Relative solutions

Page 35: Artificial Intelligence

Problem Characteristics

• DivisibilityExample for decomposable problemsIntegral of ( x2 +3x + Sin2x.Cos2x .dx )

Can be divided to Integral of x2

Integral of 3xIntegral of Sin2x.Cos2x, which can be further

divided to (1- Cos2x). Cos2x ….

Integral of x2

Page 36: Artificial Intelligence

Problem Characteristics

• Example for non- decomposable problems

Start state Goal state

Page 37: Artificial Intelligence

Problem Characteristics

• Example for non- decomposable problems

Page 38: Artificial Intelligence

Problem Characteristics Absolute and Relative Solution Steps

Absolute and relative Solution Steps Consider the following problem1. Marcus was a man2. Marcus was a Pompean3. Marcus was born in 40 AD4. All men are mortal5. All Pompeans died when volcano erupted in 79 AD6. No mortal lives longer than 150 years7. Now it is 1983 AD

“ Is Marcus alive now? “

Page 39: Artificial Intelligence

Problem Characteristics Relative Solution Steps

1. Marcus was a man - Axiom12. All men are mortal -Axiom43. Marcus was Mortal - Axiom1&44. Marcus was born in 40 AD -Axiom35. Now it is 1983 AD -Axiom76. Marcus lived 1983 years ago- 4&57. No mortal lives longer than 150 years

-Axiom68. Marcus is not alive -3,6,7

Page 40: Artificial Intelligence

Problem Characteristics Relative Solution Steps

1. Marcus was a Pompean2. Marcus was born in 40 AD

3. All Pompeans died when volcano erupted in 79 AD

4. So Marcus is not alive

Page 41: Artificial Intelligence

Search Methods

Search process can be viewed as traversal of tree structure in which each node represents a problem state and each arc represents relationship between states represented by the node it connects.

The search process must find a path or paths through the tree that connect an initial state with one or more final state. Hence the solution of an AI problem is nothing but searching efficient path between initial and goal states.

Page 42: Artificial Intelligence

Search Methods

The important issues that arise with all search techniques are as follows.

1. The direction in which to conduct the search ( forward reasoning or backward reasoning)

2. How to select applicable rules? (matching)

3. How to represent each node of the search process ( knowledge representation problem)

Page 43: Artificial Intelligence

Search Techniques

The various search techniques to solve the given problem are

1. Depth-First or Generate and Test 2. Breadth First3. Best First4. Hill Climbing5. Problem Reduction6. Means end Analysis7. Constraint Satisfaction