You are on page 1of 43

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, DepthLimited Search, Bi-Directional SearchConstraint Satisfaction search.

Definitions of AI

There are various definitions given by experts in describing what is 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.

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.

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.

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.

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.

Examples of AI problems (contd.) (Application Areas)


2. Theorem Proving Finding proof of a mathematical requires following intelligence. theorem

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.

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.

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.

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.

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.

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.

Simple Definitions
Data Data Processing Information Knowledge Knowledge base

Simple Definitions
Data
Data are the facts and figures about a particular activity.

Data Processing
The process of collecting all the required data together to produce meaningful information.

Information
Information is obtained by processing the data into meaningful form

Knowledge
It is structured representation of all the facts of an AI problem

Knowledge base
The facts or assertions about the problem domain.

Data base
The storage medium for the state variables.

Problem Solving, Problem Spaces and Problem Characteristics

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.

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.

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.

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.

State Space Representation


State Space Representation is a structured representation of an unstructured problem. It consists of
1. 2. 3. 4. Initial States Final States (Goal State) Intermediate states Operators, which indicates action to be performed for making the changes in the initial states to reach the goal state. A complete knowledge of the problem which is needed for applying the operators to make a state change.

5.

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.

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.

1. Assumptions
In order to solve the above problem we can make the following assumptions without affecting the problem.
1. 2. 3. 4. We can fill the jugs with the help of a pump. We can pour water from any jug to the ground. We can transfer water from one jug to the other. No external measuring devices are available.

2. Solution Steps
We can list the steps that may be followed to reach the goal state. 1. 2. 3. 4. 5. 6. 7. Fill the 3 gallon jug with water Pour the water from 3 gallon jug to 4 gallon jug. Again fill the 3 gallon jug with water Pour the water carefully from 3 gallon jug to 4 gallon jug such that it is just filled. Empty the 4 gallon jug Transfer the water from 3 gallon jug to 4 gallon jug. Stop.

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)

State Space Representation


2.Operators

Let us define the following 4 operators.


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

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.

State Space Representation


3. Abbreviations

G3 3 Gallon Jug G4 4 Gallon Jug

4.State Space Representation


State No. Operator State (G4,G3)

0 (Initial) 1 2 3 4 5 6 (Final)

--------FILL (G3) TRANSFER (G3, G4) FILL (G3) POUR (G3, G4) EMPTY (G4) TRANSFER (G3,G4)

(0, 0) (0, 3) (3, 0) (3, 3) (4, 2) (0, 2) (2, 0)

State Space Representation


5.Operators and Conditions
Operators FILL (G3) FILL (G4) EMPTY (G4) TRANSFER (G3,G4) : : : : Conditions G3 was not full G4 was not full G4 was not empty G3 was not empty & G4 was not full G3 was not empty & G4 was not full

POUR (G3, G4)

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.

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.

Problem Characteristics

Divisibility Ignoring Solution Steps Irrecoverable solution steps Predictability of problem Absolute and Relative solutions

Problem Characteristics
Divisibility Example for decomposable problems Integral of ( x2 +3x + Sin2x.Cos2x .dx )

Integral of x2
Can be divided to Integral of x2 Integral of 3x Integral of Sin2x.Cos2x, which can be further divided to (1- Cos2x). Cos2x .

Problem Characteristics
Example for non- decomposable problems

Start state

Goal state

Problem Characteristics
Example for non- decomposable problems

Problem Characteristics
Absolute and Relative Solution Steps Absolute and relative Solution Steps Consider the following problem
1. 2. 3. 4. 5. 6. 7. Marcus was a man Marcus was a Pompean Marcus was born in 40 AD All men are mortal All Pompeans died when volcano erupted in 79 AD No mortal lives longer than 150 years Now it is 1983 AD Is Marcus alive now?

Problem Characteristics
Relative Solution Steps 1. 2. 3. 4. 5. 6. 7. Marcus was a man - Axiom1 All men are mortal -Axiom4 Marcus was Mortal - Axiom1&4 Marcus was born in 40 AD -Axiom3 Now it is 1983 AD -Axiom7 Marcus lived 1983 years ago - 4&5 No mortal lives longer than 150 years -Axiom6 8. Marcus is not alive -3,6,7

Problem Characteristics
Relative Solution Steps

1. Marcus was a Pompean


2. Marcus was born in 40 AD 3. All Pompeans died when volcano erupted in 79 AD 4. So Marcus is not alive

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.

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)

Search Techniques
The various search techniques to solve the given problem are 1. 2. 3. 4. 5. 6. 7. Depth-First or Generate and Test Breadth First Best First Hill Climbing Problem Reduction Means end Analysis Constraint Satisfaction

You might also like