SlideShare a Scribd company logo
Module 3
PROBLEM
SOLVING
PART I
SOLVING PROBLEMS BY SEARCHING
shiwani gupta 3
Agents
• An agent is an entity that can be viewed as perceiving its environment
through sensors and acting upon that environment through
effectors/actuators to achieve goals
• Ideal, rational, human, robotic, software, autonomous
• Simple reflex, Model Based, Goal based, Utility based
• The Simple Reflex Agent will work only if the correct decision can
be made on the basis of the current percept.
SHIWANI GUPTA 4
Drawback of Simple reflex agents (Module2)
• unable to plan ahead
• limited in what they can do because their actions are determined only
by the current percept
• have no knowledge of what their actions do nor of what they are
trying to achieve.
Solution:
one kind of goal-based agent… problem-solving agent.
(Problem-solving agents decide what to do by finding sequences of
actions that lead to desirable states)
• Goal formulation based on current situation
• Problem Formulation is the process of deciding what actions and
states to consider
• Search is the process of looking for different possible sequences of
actions leading to goal state
• Execution is carrying out actions recommended as solution by search
algorithm
A goal and a set of means for achieving the goal is called a problem, and
the process of exploring what the means can do is called search
SHIWANI GUPTA 5
Problem-solving agents
(formulate - search – execute)
Problem-Solving Agent
environment
agent
?
sensors
actuators
Problem-Solving Agent
environment
agent
?
sensors
actuators
• Formulate Goal
• Formulate Problem
•States
•Actions
• Find Solution
8
Toy Problems vs.
Real-World Problems
Toy Problems
– concise and exact
description
– used for illustration
purposes
– used for performance
comparisons
• Simple to describe
• Trivial to solve
Real-World Problems
– no single, agreed-upon
description
– people care about the
solutions
• Hours to define
SHIWANI GUPTA 9
Toy problems
– Touring in Romania
– 8-Puzzle/Sliding Block Puzzle
– Robotic Assembly
– 8 Queen
– Missionaries and Cannibals
– Cryptarithmetic
– Water Jug Problem
10
Real-World Problem:
Touring in Romania
Oradea
Bucharest
Fagaras
Pitesti
Neamt
Iasi
Vaslui
Urziceni
Hirsova
Eforie
Giurgiu
Craiova
Rimnicu Vilcea
Sibiu
Dobreta
Mehadia
Lugoj
Timisoara
Arad
Zerind
120
140
151
75
70
111
118
75
71
85
90
211
101
97
138
146
80
99
87
92
142
98
86
Aim: find a course of action that satisfies a number of specified conditions
13
Touring in Romania:
Search Problem Definition
• initial state:
– In(Arad)
• possible Actions:
– DriveTo(Zerind), DriveTo(Sibiu), DriveTo(Timisoara), etc.
• goal state:
– In(Bucharest)
• step cost:
– distances between cities
SHIWANI GUPTA 14
Example: 8-puzzle
• states?
• actions?
• goal test?
• path cost?
SHIWANI GUPTA 15
8-puzzle contd.
• states? locations of tiles
• actions? move blank left, right, up, down
• goal test? = goal state (given)
• path cost? 1 per move
[Note: optimal solution of n-Puzzle family is NP-hard]
SHIWANI GUPTA 16
Example: robotic assembly
• states?
• actions?
• goal test?
• path cost?
SHIWANI GUPTA 17
Example: robotic assembly
• states?: real-valued coordinates of robot joint angles; parts of the
object to be assembled
• actions?: continuous motions of robot joints
• goal test?: complete assembly
• path cost?: time to execute
SHIWANI GUPTA 18
Example: 8 queens problem
The incremental formulation involves placing queens one by one,
whereas
the complete-state formulation starts with all 8 queens on the board and
moves them around.
In either case, the path cost is of no interest because only the final state
counts; algorithms are thus compared only on search cost.
Goal test: 8 queens on board, none attacked.
Path cost: zero.
States: any arrangement of 0 to 8 queens on board.
Operators: add a queen to any square.
SHIWANI GUPTA 19
Incremental formulation
The fact that placing a queen where it is already attacked cannot work,
because subsequent placing of other queens will not undo the attack.
So we might try the following:
States: arrangements of 0 to 8 queens with none attacked
Operators: place a queen in the left-most empty column such that it is not
attacked by any other queen
It is easy to see that the actions given
can generate only states with no attacks;
but sometimes no actions will be possible.
For example, after making the first seven
choices (left-to-right)
A quick calculation shows that there are only
Much fewer sequences to investigate.
The right formulation makes a big
difference to the size of the search space.
SHIWANI GUPTA 20
Complete formulation
• States: arrangements of 8 queens, one in each column.
• Operators: move any attacked queen to another square in the
same column.
SHIWANI GUPTA 21
Example: Missionaries and cannibals problem
(Three missionaries and three cannibals are on one side of a river, along with a boat that can hold
max two people. Find a way to get everyone to the other side, without ever leaving a group of
missionaries in one place outnumbered by the cannibals in that place)
States: a state consists of an ordered sequence of three numbers representing
the number of missionaries, cannibals, and boats on the bank of the river
from which they started. Thus, the start state is (3,3,1)
Operators: from each state the possible operators are to take either one
missionary, one cannibal, two missionaries, two cannibals, or one of each
across in the boat. Thus, there are at most five operators, although most
states have fewer because it is necessary to avoid illegal states. Note that if
we had chosen to distinguish between individual people then there would be
27 operators instead of just 5
Goal test: reached state (0,0,1)
Path cost: number of crossings
22
Missionaries and Cannibals:
Successor Function
state set of <action, state>
(L:3m,3c,b-R:0m,0c) → {<2c, (L:3m,1c-R:0m,2c,b)>,
<1m1c, (L:2m,2c-R:1m,1c,b)>,
<1c, (L:3m,2c-R:0m,1c,b)>}
(L:3m,1c-R:0m,2c,b) → {<2c, (L:3m,3c,b-R:0m,0c) >,
<1c, (L:3m,2c,b-R:0m,1c)>}
(L:2m,2c-R:1m,1c,b) → {<1m1c, (L:3m,3c,b-R:0m,0c) >,
<1m, (L:3m,2c,b-R:0m,1c)>}
23
Missionaries and Cannibals: State
Space
1c
1m
1c
2c
1c
2c
1c
2m
1m
1c
1m
1c
1c
2c
1m
2m
1c
2c
1c
1m
SHIWANI GUPTA 24
LEFT BANK RIGHT BANK
0 Initial setup: MMMCCC B -
1 Two cannibals cross over: MMMC B CC
2 One comes back: MMMCC B C
3 Two cannibals go over again: MMM B CCC
4 One comes back: MMMC B CC
5 Two missionaries cross: MC B MMCC
6 A missionary & cannibal return: MMCC B MC
7 Two missionaries cross again: CC B MMMC
8 A cannibal returns: CCC B MMM
9 Two cannibals cross: C B MMMCC
10 One returns: CC B MMMC
11 And brings over the third: - B MMMCCC
25
Missionaries and Cannibals: Goal
State and Path Cost
• goal state:
– all missionaries, all
cannibals, and the
boat are on the right
bank.
• path cost
– step cost: 1 for each
crossing
– path cost: number of
crossings = length of path
• solution path:
– 4 optimal solutions
– cost: 11
SHIWANI GUPTA 30
Example: Cryptarithmetic
States: a cryptarithmetic puzzle with some letters replaced by digits.
Operators: replace all occurrences of a letter with a digit not already
appearing in the puzzle.
Goal test: puzzle contains only digits, and represents a correct sum.
Path cost: zero. All solutions equally valid.
One way to do this is to adopt a fixed order, e.g., alphabetical order.
A better choice is to do whichever is the most constrained substitution,
that is, the letter that has the fewest legal possibilities given the
constraints of the puzzle.
Crypt-Arithmetic puzzle
• Problem Statement:
– Solve the following puzzle by assigning numeral (0-9) in such a way that
each letter is assigned unique digit which satisfy the following addition.
– Constraints : No two letters have the same value. (The constraints of
arithmetic).
• Initial Problem State
– S = ? ; E = ? ;N = ? ; D = ? ; M = ? ;O = ? ; R = ? ;Y = ?
S E N D
+ M O R E
_________________________________
M O N E Y
_________________________________
Carries:
C4 = ? ;C3 = ? ;C2 = ? ;C1 = ?
Constraint equations:
Y = D + E C1
E = N + R + C1 C2
N = E + O + C2 C3
O = S + M + C3 C4
M = C4
C4 C3 C2 C1 Carry
S E N D
+ M O R E
_________________________________
M O N E Y
_________________________________
• We can easily see that M has to be non zero
digit, so the value of C4 =1
1. M = C4  M = 1
2. O = S + M + C3 → C4
For C4 =1, S + M + C3 > 9 
S + 1 + C3 > 9  S+C3 > 8.
If C3 = 0, then S = 9 else if C3 = 1,
then S = 8 or 9.
• We see that for S = 9
– C3 = 0 or 1
– It can be easily seen that C3 = 1 is not
possible as O = S + M + C3  O = 11
 O has to be assigned digit 1 but 1 is
already assigned to M, so not possible.
– Therefore, only choice for C3 = 0, and
thus O = 10. This implies that O is
assigned 0 (zero) digit.
• Therefore, O = 0
M = 1, O = 0
C4 C3 C2 C1 Carry
S E N D
+ M O R E
_________________________________
M O N E Y
_________________________________
Y = D + E → C1
E = N + R + C1 → C2
N = E + O + C2 → C3
O = S + M + C3 → C4
M = C4
3. Since C3 = 0; N = E + O + C2 produces
no carry.
• As O = 0, N = E + C2 .
• Since N  E, therefore, C2 = 1.
Hence N = E + 1
• Now E can take value from 2 to 8 {0,1,9
already assigned so far }
– If E = 2, then N = 3.
– Since C2 = 1, from E = N + R + C1 ,
we get 12 = N + R + C1
• If C1 = 0 then R = 9, which is not
possible as we are on the path with S
= 9
• If C1 = 1 then R = 8, then
» From Y = D + E , we get 10
+ Y= D + 2 .
» For no value of D, we can get
Y.
– Try similarly for E = 3, 4. We fail in
each case.
C4 C3 C2 C1 Carry
S E N D
+ M O R E
_________________________________
M O N E Y
_________________________________
Y = D + E → C1
E = N + R + C1 → C2
N = E + O + C2 → C3
O = S + M + C3 → C4
M = C4
• If E = 5, then N = 6
– Since C2 = 1, from E = N + R + C1 ,
we get 15 = N + R + C1 ,
– If C1 = 0 then R = 9, which is not
possible as we are on the path with
S = 9.
– If C1 = 1 then R = 8, then
• From Y = D + E , we get 10 +
Y= D + 5 i.e., 5 + Y = D.
• If Y = 2 then D = 7. These
values are possible.
• Hence we get the final solution as
given below and on backtracking, we
may find more solutions.
S = 9 ; E = 5 ; N = 6 ; D = 7 ;
M = 1 ; O = 0 ; R = 8 ;Y = 2
C4 C3 C2 C1 Carry
S E N D
+ M O R E
_________________________________
M O N E Y
_________________________________
Y = D + E → C1
E = N + R + C1 → C2
N = E + O + C2 → C3
O = S + M + C3 → C4
M = C4
Constraints:
Y = D + E C1
E = N + R + C1 C2
N = E + O + C2 C3
O = S + M + C3 C4
M = C4
Initial State
M = 1 → C4 = 1
O = 1 + S + C3
O
S = 9 S = 8
O
C3 = 0 C3 = 1
O = 0 O = 1
Fixed 
M = 1
O = 0
N = E + O + C2 = E + C2 → C2 = 1 (must) → N = E + 1
E = 2 E = 3 ….. E = 5
N = 3 N = 6
E = N + R + C1 E = N + R + C1
10 + 2 = 3 + R + C1 10 + 5 = 6 + R + C1
O  O
R = 9 R = 8 R = 9 R = 8
C1 =0 C1 = 1 C1 = 0 C1 = 1
 O  O
10 + Y = D + E = D + 2 10 + Y = D + E = D + 5
O O
D = 8 D = 9 D = 7
Y = 0 Y = 1 Y = 2
   
The first solution obtained is:
M = 1, O = 0, S = 9, E = 5, N = 6, R = 8, D = 7, Y = 2
C4 C3 C2 C1  Carries
B A S E
+ B A L L
_________________________________
G A M E S
_________________________________
Constraints equations are:
E + L = S → C1
S + L + C1= E → C2
2A + C2 = M → C3
2B + C3 = A → C4
G = C4
Initial Problem State
G = ?; A = ?;M = ?; E = ?; S = ?; B = ?; L = ?
1. G = C4  G = 1
2. 2B+ C3 = A → C4
2.1 Since C4 = 1, therefore, 2B+ C3 > 9  B can take values from 5 to 9.
2.2 Try the following steps for each value of B from 5 to 9 till we get a
possible value of B.
if C3 = 0 A = 0  M = 0 for C2 = 0 or M = 1 for C2 = 1 
• If B = 5
if C3 = 1  A = 1  (as G = 1 already)
• For B = 6 we get similar contradiction while generating the search tree.
• If B = 7 , then for C3 = 0, we get A = 4  M = 8 if C2 = 0 that leads to
contradiction, so this path is pruned. If C2 = 1, then M = 9 .
3. Let us solve S + L + C1 = E and E + L = S
• Using both equations, we get 2L + C1 = 0  L = 5 and C1 = 0
• Using L = 5, we get S + 5 = E that should generate carry C2 = 1 as shown
above
• So S+5 > 9  Possible values for E are {2, 3, 6, 8} (with carry bit C2 = 1 )
• If E = 2 then S + 5 = 12  S = 7  (as B = 7 already)
• If E = 3 then S + 5 = 13  S = 8.
• Therefore E = 3 and S = 8 are fixed up.
4. Hence we get the final solution as given below and on backtracking, we may find
more solutions. In this case we get only one solution.
G = 1; A = 4; M = 9; E = 3; S = 8;B = 7; L = 5
SHIWANI GUPTA 39
MARS Each of the ten letters (m, a, r, s, v, e,
+ VENUS n, u, t, and p) represents a unique number
+ URANUS in the range 0 .. 9.
+ SATURN
------------
NEPTUNE Solution: NEPTUNE = 1078610
M=4, A=5, R=9, etc.
Water Jug Problem
• Problem Statement: "You are given two jugs, a
4-gallon one and a 3-gallon one. Neither has
any measuring markers on it. There is a tap
that can be used to fill the jugs with water.
How can you get exactly 2 gallons of water
into the 4-gallon jug?"
SHIWANI GUPTA 40
Production Rules
Rules Conclusions
R1:(X, Y | X < 4) → (4, Y) {Fill 4-gallon jug}
R2:(X, Y | Y < 3) →(X, 3) {Fill 3-gallon jug}
R3:(X, Y | X > 0) →(0, Y) {Empty 4-gallon jug}
R4:(X, Y | Y > 0) →(X, 0) {Empty 3-gallon jug}
R5:(X, Y | X+Y >= 4 ΛY > 0) →(4, Y –(4 –X)) {Pour water from 3-gallon jug into 4-
gallon jug until 4-gallon jug is full}
R6:(X, Y | X+Y >= 3 ΛX > 0) →(X –(3 –Y), 3)) {Pour water from 4-gallon jug into 3-
gallon jug until 3-gallon jug is full}
R7:(X, Y | X+Y <= 4 ΛY > 0) → (X+Y, 0) {Pour all water from 3-gallon jug into 4- gallon jug }
R8:(X, Y | X+Y <= 3 ΛX > 0) →(0, X+Y) {Pour all water from 4-gallon jug into 3- gallon jug }
R9:(X, Y | X > 0) → (X –D, Y) {Pour some water D out from 4- gallon jug}
R10:(X, Y | Y > 0) →(X, Y -D) {Pour some water D out from 3- gallon jug}
SHIWANI GUPTA 41
SHIWANI GUPTA 42
2 0
Number Rules applied 4-g jug 3-g jug
of steps
1 Initial State 0 0
2 R1 {Fill 4-gallon jug} 4 0
3 R6 {Pour from 4 to 3-g jug until it is full } 1 3
4 R4 {Empty 3-gallon jug} 1 0
5 R8 {Pour all water from 4 to 3-gallon jug} 0 1
6 R1 {Fill 4-gallon jug} 4 1
7 R6 {Pour from 4 to 3-g jug until it is full} 2 3
8 R4 {Empty 3-gallon jug}
Goal State
Solution
Water Jug Problem
Given a full 5-gallon jug and a full 2-gallon jug, fill the 2-gallon jug with
exactly one gallon of water.
• State: ?
• Initial State: ?
• Operators: ?
• Goal State: ?
5
2
SHIWANI GUPTA 45
Real World problems
• Route Finding applications, such as routing in computer networks,
automated travel advisory systems, and airline travel planning systems.
• Touring and traveling salesperson problem is a famous touring
problem in which each city must be visited exactly once. The aim is to find
the shortest tour.
• VLSI layout with cell layout and channel routing.
• Robot navigation is a generalization of the route-finding problem
described earlier. Rather than a discrete set of routes, a robot can move in a
continuous space with (in principle) an infinite set of possible actions and
states.
• Assembly sequencing of complex objects by a robot, the problem is to
find an order in which to assemble the parts of some object. If the wrong
order is chosen, there will be no way to add some part later in the sequence
without undoing some of the work already done.
• Monkey Banana Problem
General Route Finding Problem
• Problem Statement
• States: Locations
• Initial State: Starting Point
• Successor Function(Operators): Move from one location
to other
• Goal Test: Arrive at certain location
• Path Cost: Money, time, travel, comfort, scenery,…
SHIWANI GUPTA 46
Travelling Salesman Problem
• Problem Statement
• States: Locations/cities
• Initial State: Starting Point
• Successor Function(Operators): Move from one location
to other
• Goal Test:All locations visited, Agent at initial location
• Path Cost: Distance between locations
SHIWANI GUPTA 47
VLSI layout problem
• Problem Statement
• States: Positions of components, wires on chip
• Initial State:
– Incremental
– Complete State
• Successor Function(Operators)
– Incremental
– Complete State
• Goal Test: All components placed and connected as specified
• Path Cost: distance, capacity, no. of connections per component
SHIWANI GUPTA 48
Robot Navigation
• Problem Statement
• States: Locations, Position of actuator
• Initial State: Start pos
• Successor Function(Operators): Movement, actions of
actuators
• Goal Test: Task Dependent
• Path Cost: Distance, Energy consumption
SHIWANI GUPTA 49
Assembly Sequencing
• Problem Statement
• States: Location of components
• Initial State: No components assembled
• Successor Function(Operators): Place component
• Goal Test: System fully assembled
• Path Cost: Number of moves
SHIWANI GUPTA 50
Monkey Banana Problem
• Problem Statement
• States:
• Initial State: Monkey on the floor without bananas
• Successor Function(Operators)
• Goal Test
• Path Cost: The number of moves by monkey to get bananas
SHIWANI GUPTA 51
Search Problem
• State space
– each state is an abstract representation of the
environment
– the state space is discrete
• Initial state
• Successor function
• Goal test
• Path cost
Search Problem
• State space
• Initial state:
– usually the current state
– sometimes one or several hypothetical states
(“what if …”)
• Successor function
• Goal test
• Path cost
Search Problem
• State space
• Initial state
• Successor function:
– [state → subset of states]
– an abstract representation of the possible actions
• Goal test
• Path cost
Search Problem
• State space
• Initial state
• Successor function
• Goal test:
– usually a condition
– sometimes the description of a state
• Path cost
Search Problem
• State space
• Initial state
• Successor function
• Goal test
• Path cost:
– [path → positive number]
– usually, path cost = sum of step costs
– e.g., number of moves of the empty tile
Assumptions in Basic Search
• The environment is static
• The environment is discretizable
• The environment is observable
• The actions are deterministic
University Questions
• Solve the following Crypt arithmetic problem:
FORTY
CROSS SEND BASE TEN EAT
ROADS MORE BALL TEN THAT
DANGER MONEY GAMES SIXTY
APPLE
• You are given 2 jugs of cap 4l and 3l each. Neither of the jugs have
any measuring markers on them. There is a pump that can be used to
fill jugs with water. How can u get exactly 2l of water in 4l jug?
Formulate the problem in state space and draw complete diagram
• Consider jugs of volumes 3 and 7 units are available. Show the trace
to measure 2 and 5 units.
• Solve Wolf Goat Cabbage problem.

More Related Content

What's hot

L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
Manjula V
 
Knowledge based agent
Knowledge based agentKnowledge based agent
Knowledge based agent
Shiwani Gupta
 
I. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmI. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithm
vikas dhakane
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
Luigi Ceccaroni
 
Greedy algorithm activity selection fractional
Greedy algorithm activity selection fractionalGreedy algorithm activity selection fractional
Greedy algorithm activity selection fractional
Amit Kumar Rathi
 
Water jug problem ai part 6
Water jug problem ai part 6Water jug problem ai part 6
Water jug problem ai part 6
Kirti Verma
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
Megha Sharma
 
Daa notes 1
Daa notes 1Daa notes 1
Daa notes 1
smruti sarangi
 
Ai notes
Ai notesAi notes
Ai notes
AbdullahGubbi1
 
Knowledge representation In Artificial Intelligence
Knowledge representation In Artificial IntelligenceKnowledge representation In Artificial Intelligence
Knowledge representation In Artificial Intelligence
Ramla Sheikh
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithms
Rajendran
 
Dijkstra
DijkstraDijkstra
Dijkstra
jagdeeparora86
 
Game Playing in Artificial Intelligence
Game Playing in Artificial IntelligenceGame Playing in Artificial Intelligence
Game Playing in Artificial Intelligence
lordmwesh
 
AI 5 | Local Search
AI 5 | Local SearchAI 5 | Local Search
AI 5 | Local Search
Mohammad Imam Hossain
 
I.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AII.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AI
vikas dhakane
 
Intelligent Agent PPT ON SLIDESHARE IN ARTIFICIAL INTELLIGENCE
Intelligent Agent PPT ON SLIDESHARE IN ARTIFICIAL INTELLIGENCEIntelligent Agent PPT ON SLIDESHARE IN ARTIFICIAL INTELLIGENCE
Intelligent Agent PPT ON SLIDESHARE IN ARTIFICIAL INTELLIGENCE
Khushboo Pal
 
Lecture: Automata
Lecture: AutomataLecture: Automata
Lecture: Automata
Marina Santini
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
Gayathri Gaayu
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
Dr. C.V. Suresh Babu
 
Heuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligenceHeuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligence
grinu
 

What's hot (20)

L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
 
Knowledge based agent
Knowledge based agentKnowledge based agent
Knowledge based agent
 
I. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmI. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithm
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
 
Greedy algorithm activity selection fractional
Greedy algorithm activity selection fractionalGreedy algorithm activity selection fractional
Greedy algorithm activity selection fractional
 
Water jug problem ai part 6
Water jug problem ai part 6Water jug problem ai part 6
Water jug problem ai part 6
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
 
Daa notes 1
Daa notes 1Daa notes 1
Daa notes 1
 
Ai notes
Ai notesAi notes
Ai notes
 
Knowledge representation In Artificial Intelligence
Knowledge representation In Artificial IntelligenceKnowledge representation In Artificial Intelligence
Knowledge representation In Artificial Intelligence
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithms
 
Dijkstra
DijkstraDijkstra
Dijkstra
 
Game Playing in Artificial Intelligence
Game Playing in Artificial IntelligenceGame Playing in Artificial Intelligence
Game Playing in Artificial Intelligence
 
AI 5 | Local Search
AI 5 | Local SearchAI 5 | Local Search
AI 5 | Local Search
 
I.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AII.BEST FIRST SEARCH IN AI
I.BEST FIRST SEARCH IN AI
 
Intelligent Agent PPT ON SLIDESHARE IN ARTIFICIAL INTELLIGENCE
Intelligent Agent PPT ON SLIDESHARE IN ARTIFICIAL INTELLIGENCEIntelligent Agent PPT ON SLIDESHARE IN ARTIFICIAL INTELLIGENCE
Intelligent Agent PPT ON SLIDESHARE IN ARTIFICIAL INTELLIGENCE
 
Lecture: Automata
Lecture: AutomataLecture: Automata
Lecture: Automata
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
 
Heuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligenceHeuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligence
 

Similar to Problem formulation

chapter3part1.ppt
chapter3part1.pptchapter3part1.ppt
chapter3part1.ppt
ssuser99ca78
 
Lop1
Lop1Lop1
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjekAIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
pavan402055
 
Lec2 state space
Lec2 state spaceLec2 state space
Lec2 state space
Praveen Kumar
 
Popular search algorithms
Popular search algorithmsPopular search algorithms
Popular search algorithms
Minakshi Atre
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
chandsek666
 
Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1
Techglyphs
 
Lecture is related to the topic of Artificial intelligence
Lecture is related to the topic of Artificial intelligenceLecture is related to the topic of Artificial intelligence
Lecture is related to the topic of Artificial intelligence
mohsinwaseer1
 
May 19, 2014
May 19, 2014May 19, 2014
May 19, 2014
khyps13
 
Constraint Satisfaction Problem (CSP) : Cryptarithmetic, Graph Coloring, 4- Q...
Constraint Satisfaction Problem (CSP) : Cryptarithmetic, Graph Coloring, 4- Q...Constraint Satisfaction Problem (CSP) : Cryptarithmetic, Graph Coloring, 4- Q...
Constraint Satisfaction Problem (CSP) : Cryptarithmetic, Graph Coloring, 4- Q...
Mahbubur Rahman
 
Discrete Math IP4 - Automata Theory
Discrete Math IP4 - Automata TheoryDiscrete Math IP4 - Automata Theory
Discrete Math IP4 - Automata Theory
Mark Simon
 
Circle & curve clipping algorithm
Circle & curve clipping algorithmCircle & curve clipping algorithm
Circle & curve clipping algorithm
Mohamed El-Serngawy
 
Lecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptxLecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptx
AndrewKuziwakwasheMu
 
Reinfrocement Learning
Reinfrocement LearningReinfrocement Learning
Reinfrocement Learning
Natan Katz
 
5.5 back track
5.5 back track5.5 back track
5.5 back track
Krish_ver2
 
Unit-1 Basic Concept of Algorithm.pptx
Unit-1 Basic Concept of Algorithm.pptxUnit-1 Basic Concept of Algorithm.pptx
Unit-1 Basic Concept of Algorithm.pptx
ssuser01e301
 
Ip 5 discrete mathematics
Ip 5 discrete mathematicsIp 5 discrete mathematics
Ip 5 discrete mathematics
Mark Simon
 
algorithm Unit 3
algorithm Unit 3algorithm Unit 3
algorithm Unit 3
Monika Choudhery
 
Spearman's Rank calculations
Spearman's Rank calculationsSpearman's Rank calculations
Spearman's Rank calculations
Guerillateacher
 
state-spaces29Sep06.ppt
state-spaces29Sep06.pptstate-spaces29Sep06.ppt
state-spaces29Sep06.ppt
PerumalPitchandi
 

Similar to Problem formulation (20)

chapter3part1.ppt
chapter3part1.pptchapter3part1.ppt
chapter3part1.ppt
 
Lop1
Lop1Lop1
Lop1
 
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjekAIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
 
Lec2 state space
Lec2 state spaceLec2 state space
Lec2 state space
 
Popular search algorithms
Popular search algorithmsPopular search algorithms
Popular search algorithms
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1
 
Lecture is related to the topic of Artificial intelligence
Lecture is related to the topic of Artificial intelligenceLecture is related to the topic of Artificial intelligence
Lecture is related to the topic of Artificial intelligence
 
May 19, 2014
May 19, 2014May 19, 2014
May 19, 2014
 
Constraint Satisfaction Problem (CSP) : Cryptarithmetic, Graph Coloring, 4- Q...
Constraint Satisfaction Problem (CSP) : Cryptarithmetic, Graph Coloring, 4- Q...Constraint Satisfaction Problem (CSP) : Cryptarithmetic, Graph Coloring, 4- Q...
Constraint Satisfaction Problem (CSP) : Cryptarithmetic, Graph Coloring, 4- Q...
 
Discrete Math IP4 - Automata Theory
Discrete Math IP4 - Automata TheoryDiscrete Math IP4 - Automata Theory
Discrete Math IP4 - Automata Theory
 
Circle & curve clipping algorithm
Circle & curve clipping algorithmCircle & curve clipping algorithm
Circle & curve clipping algorithm
 
Lecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptxLecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptx
 
Reinfrocement Learning
Reinfrocement LearningReinfrocement Learning
Reinfrocement Learning
 
5.5 back track
5.5 back track5.5 back track
5.5 back track
 
Unit-1 Basic Concept of Algorithm.pptx
Unit-1 Basic Concept of Algorithm.pptxUnit-1 Basic Concept of Algorithm.pptx
Unit-1 Basic Concept of Algorithm.pptx
 
Ip 5 discrete mathematics
Ip 5 discrete mathematicsIp 5 discrete mathematics
Ip 5 discrete mathematics
 
algorithm Unit 3
algorithm Unit 3algorithm Unit 3
algorithm Unit 3
 
Spearman's Rank calculations
Spearman's Rank calculationsSpearman's Rank calculations
Spearman's Rank calculations
 
state-spaces29Sep06.ppt
state-spaces29Sep06.pptstate-spaces29Sep06.ppt
state-spaces29Sep06.ppt
 

More from Shiwani Gupta

ML MODULE 6.pdf
ML MODULE 6.pdfML MODULE 6.pdf
ML MODULE 6.pdf
Shiwani Gupta
 
ML MODULE 5.pdf
ML MODULE 5.pdfML MODULE 5.pdf
ML MODULE 5.pdf
Shiwani Gupta
 
ML MODULE 4.pdf
ML MODULE 4.pdfML MODULE 4.pdf
ML MODULE 4.pdf
Shiwani Gupta
 
module6_stringmatchingalgorithm_2022.pdf
module6_stringmatchingalgorithm_2022.pdfmodule6_stringmatchingalgorithm_2022.pdf
module6_stringmatchingalgorithm_2022.pdf
Shiwani Gupta
 
module5_backtrackingnbranchnbound_2022.pdf
module5_backtrackingnbranchnbound_2022.pdfmodule5_backtrackingnbranchnbound_2022.pdf
module5_backtrackingnbranchnbound_2022.pdf
Shiwani Gupta
 
module4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdfmodule4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdf
Shiwani Gupta
 
module3_Greedymethod_2022.pdf
module3_Greedymethod_2022.pdfmodule3_Greedymethod_2022.pdf
module3_Greedymethod_2022.pdf
Shiwani Gupta
 
module2_dIVIDEncONQUER_2022.pdf
module2_dIVIDEncONQUER_2022.pdfmodule2_dIVIDEncONQUER_2022.pdf
module2_dIVIDEncONQUER_2022.pdf
Shiwani Gupta
 
module1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdfmodule1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdf
Shiwani Gupta
 
ML MODULE 1_slideshare.pdf
ML MODULE 1_slideshare.pdfML MODULE 1_slideshare.pdf
ML MODULE 1_slideshare.pdf
Shiwani Gupta
 
ML MODULE 2.pdf
ML MODULE 2.pdfML MODULE 2.pdf
ML MODULE 2.pdf
Shiwani Gupta
 
ML Module 3.pdf
ML Module 3.pdfML Module 3.pdf
ML Module 3.pdf
Shiwani Gupta
 
Simplex method
Simplex methodSimplex method
Simplex method
Shiwani Gupta
 
Functionsandpigeonholeprinciple
FunctionsandpigeonholeprincipleFunctionsandpigeonholeprinciple
Functionsandpigeonholeprinciple
Shiwani Gupta
 
Relations
RelationsRelations
Relations
Shiwani Gupta
 
Logic
LogicLogic
Set theory
Set theorySet theory
Set theory
Shiwani Gupta
 
Uncertain knowledge and reasoning
Uncertain knowledge and reasoningUncertain knowledge and reasoning
Uncertain knowledge and reasoning
Shiwani Gupta
 
Introduction to ai
Introduction to aiIntroduction to ai
Introduction to ai
Shiwani Gupta
 
Planning Agent
Planning AgentPlanning Agent
Planning Agent
Shiwani Gupta
 

More from Shiwani Gupta (20)

ML MODULE 6.pdf
ML MODULE 6.pdfML MODULE 6.pdf
ML MODULE 6.pdf
 
ML MODULE 5.pdf
ML MODULE 5.pdfML MODULE 5.pdf
ML MODULE 5.pdf
 
ML MODULE 4.pdf
ML MODULE 4.pdfML MODULE 4.pdf
ML MODULE 4.pdf
 
module6_stringmatchingalgorithm_2022.pdf
module6_stringmatchingalgorithm_2022.pdfmodule6_stringmatchingalgorithm_2022.pdf
module6_stringmatchingalgorithm_2022.pdf
 
module5_backtrackingnbranchnbound_2022.pdf
module5_backtrackingnbranchnbound_2022.pdfmodule5_backtrackingnbranchnbound_2022.pdf
module5_backtrackingnbranchnbound_2022.pdf
 
module4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdfmodule4_dynamic programming_2022.pdf
module4_dynamic programming_2022.pdf
 
module3_Greedymethod_2022.pdf
module3_Greedymethod_2022.pdfmodule3_Greedymethod_2022.pdf
module3_Greedymethod_2022.pdf
 
module2_dIVIDEncONQUER_2022.pdf
module2_dIVIDEncONQUER_2022.pdfmodule2_dIVIDEncONQUER_2022.pdf
module2_dIVIDEncONQUER_2022.pdf
 
module1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdfmodule1_Introductiontoalgorithms_2022.pdf
module1_Introductiontoalgorithms_2022.pdf
 
ML MODULE 1_slideshare.pdf
ML MODULE 1_slideshare.pdfML MODULE 1_slideshare.pdf
ML MODULE 1_slideshare.pdf
 
ML MODULE 2.pdf
ML MODULE 2.pdfML MODULE 2.pdf
ML MODULE 2.pdf
 
ML Module 3.pdf
ML Module 3.pdfML Module 3.pdf
ML Module 3.pdf
 
Simplex method
Simplex methodSimplex method
Simplex method
 
Functionsandpigeonholeprinciple
FunctionsandpigeonholeprincipleFunctionsandpigeonholeprinciple
Functionsandpigeonholeprinciple
 
Relations
RelationsRelations
Relations
 
Logic
LogicLogic
Logic
 
Set theory
Set theorySet theory
Set theory
 
Uncertain knowledge and reasoning
Uncertain knowledge and reasoningUncertain knowledge and reasoning
Uncertain knowledge and reasoning
 
Introduction to ai
Introduction to aiIntroduction to ai
Introduction to ai
 
Planning Agent
Planning AgentPlanning Agent
Planning Agent
 

Recently uploaded

Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt
PuktoonEngr
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
ssuser36d3051
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
Series of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.pptSeries of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.ppt
PauloRodrigues104553
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
Series of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.pptSeries of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.ppt
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 

Problem formulation

  • 2. PART I SOLVING PROBLEMS BY SEARCHING
  • 3. shiwani gupta 3 Agents • An agent is an entity that can be viewed as perceiving its environment through sensors and acting upon that environment through effectors/actuators to achieve goals • Ideal, rational, human, robotic, software, autonomous • Simple reflex, Model Based, Goal based, Utility based • The Simple Reflex Agent will work only if the correct decision can be made on the basis of the current percept.
  • 4. SHIWANI GUPTA 4 Drawback of Simple reflex agents (Module2) • unable to plan ahead • limited in what they can do because their actions are determined only by the current percept • have no knowledge of what their actions do nor of what they are trying to achieve. Solution: one kind of goal-based agent… problem-solving agent. (Problem-solving agents decide what to do by finding sequences of actions that lead to desirable states) • Goal formulation based on current situation • Problem Formulation is the process of deciding what actions and states to consider • Search is the process of looking for different possible sequences of actions leading to goal state • Execution is carrying out actions recommended as solution by search algorithm A goal and a set of means for achieving the goal is called a problem, and the process of exploring what the means can do is called search
  • 5. SHIWANI GUPTA 5 Problem-solving agents (formulate - search – execute)
  • 7. Problem-Solving Agent environment agent ? sensors actuators • Formulate Goal • Formulate Problem •States •Actions • Find Solution
  • 8. 8 Toy Problems vs. Real-World Problems Toy Problems – concise and exact description – used for illustration purposes – used for performance comparisons • Simple to describe • Trivial to solve Real-World Problems – no single, agreed-upon description – people care about the solutions • Hours to define
  • 9. SHIWANI GUPTA 9 Toy problems – Touring in Romania – 8-Puzzle/Sliding Block Puzzle – Robotic Assembly – 8 Queen – Missionaries and Cannibals – Cryptarithmetic – Water Jug Problem
  • 10. 10 Real-World Problem: Touring in Romania Oradea Bucharest Fagaras Pitesti Neamt Iasi Vaslui Urziceni Hirsova Eforie Giurgiu Craiova Rimnicu Vilcea Sibiu Dobreta Mehadia Lugoj Timisoara Arad Zerind 120 140 151 75 70 111 118 75 71 85 90 211 101 97 138 146 80 99 87 92 142 98 86 Aim: find a course of action that satisfies a number of specified conditions
  • 11. 13 Touring in Romania: Search Problem Definition • initial state: – In(Arad) • possible Actions: – DriveTo(Zerind), DriveTo(Sibiu), DriveTo(Timisoara), etc. • goal state: – In(Bucharest) • step cost: – distances between cities
  • 12. SHIWANI GUPTA 14 Example: 8-puzzle • states? • actions? • goal test? • path cost?
  • 13. SHIWANI GUPTA 15 8-puzzle contd. • states? locations of tiles • actions? move blank left, right, up, down • goal test? = goal state (given) • path cost? 1 per move [Note: optimal solution of n-Puzzle family is NP-hard]
  • 14. SHIWANI GUPTA 16 Example: robotic assembly • states? • actions? • goal test? • path cost?
  • 15. SHIWANI GUPTA 17 Example: robotic assembly • states?: real-valued coordinates of robot joint angles; parts of the object to be assembled • actions?: continuous motions of robot joints • goal test?: complete assembly • path cost?: time to execute
  • 16. SHIWANI GUPTA 18 Example: 8 queens problem The incremental formulation involves placing queens one by one, whereas the complete-state formulation starts with all 8 queens on the board and moves them around. In either case, the path cost is of no interest because only the final state counts; algorithms are thus compared only on search cost. Goal test: 8 queens on board, none attacked. Path cost: zero. States: any arrangement of 0 to 8 queens on board. Operators: add a queen to any square.
  • 17. SHIWANI GUPTA 19 Incremental formulation The fact that placing a queen where it is already attacked cannot work, because subsequent placing of other queens will not undo the attack. So we might try the following: States: arrangements of 0 to 8 queens with none attacked Operators: place a queen in the left-most empty column such that it is not attacked by any other queen It is easy to see that the actions given can generate only states with no attacks; but sometimes no actions will be possible. For example, after making the first seven choices (left-to-right) A quick calculation shows that there are only Much fewer sequences to investigate. The right formulation makes a big difference to the size of the search space.
  • 18. SHIWANI GUPTA 20 Complete formulation • States: arrangements of 8 queens, one in each column. • Operators: move any attacked queen to another square in the same column.
  • 19. SHIWANI GUPTA 21 Example: Missionaries and cannibals problem (Three missionaries and three cannibals are on one side of a river, along with a boat that can hold max two people. Find a way to get everyone to the other side, without ever leaving a group of missionaries in one place outnumbered by the cannibals in that place) States: a state consists of an ordered sequence of three numbers representing the number of missionaries, cannibals, and boats on the bank of the river from which they started. Thus, the start state is (3,3,1) Operators: from each state the possible operators are to take either one missionary, one cannibal, two missionaries, two cannibals, or one of each across in the boat. Thus, there are at most five operators, although most states have fewer because it is necessary to avoid illegal states. Note that if we had chosen to distinguish between individual people then there would be 27 operators instead of just 5 Goal test: reached state (0,0,1) Path cost: number of crossings
  • 20. 22 Missionaries and Cannibals: Successor Function state set of <action, state> (L:3m,3c,b-R:0m,0c) → {<2c, (L:3m,1c-R:0m,2c,b)>, <1m1c, (L:2m,2c-R:1m,1c,b)>, <1c, (L:3m,2c-R:0m,1c,b)>} (L:3m,1c-R:0m,2c,b) → {<2c, (L:3m,3c,b-R:0m,0c) >, <1c, (L:3m,2c,b-R:0m,1c)>} (L:2m,2c-R:1m,1c,b) → {<1m1c, (L:3m,3c,b-R:0m,0c) >, <1m, (L:3m,2c,b-R:0m,1c)>}
  • 21. 23 Missionaries and Cannibals: State Space 1c 1m 1c 2c 1c 2c 1c 2m 1m 1c 1m 1c 1c 2c 1m 2m 1c 2c 1c 1m
  • 22. SHIWANI GUPTA 24 LEFT BANK RIGHT BANK 0 Initial setup: MMMCCC B - 1 Two cannibals cross over: MMMC B CC 2 One comes back: MMMCC B C 3 Two cannibals go over again: MMM B CCC 4 One comes back: MMMC B CC 5 Two missionaries cross: MC B MMCC 6 A missionary & cannibal return: MMCC B MC 7 Two missionaries cross again: CC B MMMC 8 A cannibal returns: CCC B MMM 9 Two cannibals cross: C B MMMCC 10 One returns: CC B MMMC 11 And brings over the third: - B MMMCCC
  • 23. 25 Missionaries and Cannibals: Goal State and Path Cost • goal state: – all missionaries, all cannibals, and the boat are on the right bank. • path cost – step cost: 1 for each crossing – path cost: number of crossings = length of path • solution path: – 4 optimal solutions – cost: 11
  • 24. SHIWANI GUPTA 30 Example: Cryptarithmetic States: a cryptarithmetic puzzle with some letters replaced by digits. Operators: replace all occurrences of a letter with a digit not already appearing in the puzzle. Goal test: puzzle contains only digits, and represents a correct sum. Path cost: zero. All solutions equally valid. One way to do this is to adopt a fixed order, e.g., alphabetical order. A better choice is to do whichever is the most constrained substitution, that is, the letter that has the fewest legal possibilities given the constraints of the puzzle.
  • 25. Crypt-Arithmetic puzzle • Problem Statement: – Solve the following puzzle by assigning numeral (0-9) in such a way that each letter is assigned unique digit which satisfy the following addition. – Constraints : No two letters have the same value. (The constraints of arithmetic). • Initial Problem State – S = ? ; E = ? ;N = ? ; D = ? ; M = ? ;O = ? ; R = ? ;Y = ? S E N D + M O R E _________________________________ M O N E Y _________________________________
  • 26. Carries: C4 = ? ;C3 = ? ;C2 = ? ;C1 = ? Constraint equations: Y = D + E C1 E = N + R + C1 C2 N = E + O + C2 C3 O = S + M + C3 C4 M = C4 C4 C3 C2 C1 Carry S E N D + M O R E _________________________________ M O N E Y _________________________________
  • 27. • We can easily see that M has to be non zero digit, so the value of C4 =1 1. M = C4  M = 1 2. O = S + M + C3 → C4 For C4 =1, S + M + C3 > 9  S + 1 + C3 > 9  S+C3 > 8. If C3 = 0, then S = 9 else if C3 = 1, then S = 8 or 9. • We see that for S = 9 – C3 = 0 or 1 – It can be easily seen that C3 = 1 is not possible as O = S + M + C3  O = 11  O has to be assigned digit 1 but 1 is already assigned to M, so not possible. – Therefore, only choice for C3 = 0, and thus O = 10. This implies that O is assigned 0 (zero) digit. • Therefore, O = 0 M = 1, O = 0 C4 C3 C2 C1 Carry S E N D + M O R E _________________________________ M O N E Y _________________________________ Y = D + E → C1 E = N + R + C1 → C2 N = E + O + C2 → C3 O = S + M + C3 → C4 M = C4
  • 28. 3. Since C3 = 0; N = E + O + C2 produces no carry. • As O = 0, N = E + C2 . • Since N  E, therefore, C2 = 1. Hence N = E + 1 • Now E can take value from 2 to 8 {0,1,9 already assigned so far } – If E = 2, then N = 3. – Since C2 = 1, from E = N + R + C1 , we get 12 = N + R + C1 • If C1 = 0 then R = 9, which is not possible as we are on the path with S = 9 • If C1 = 1 then R = 8, then » From Y = D + E , we get 10 + Y= D + 2 . » For no value of D, we can get Y. – Try similarly for E = 3, 4. We fail in each case. C4 C3 C2 C1 Carry S E N D + M O R E _________________________________ M O N E Y _________________________________ Y = D + E → C1 E = N + R + C1 → C2 N = E + O + C2 → C3 O = S + M + C3 → C4 M = C4
  • 29. • If E = 5, then N = 6 – Since C2 = 1, from E = N + R + C1 , we get 15 = N + R + C1 , – If C1 = 0 then R = 9, which is not possible as we are on the path with S = 9. – If C1 = 1 then R = 8, then • From Y = D + E , we get 10 + Y= D + 5 i.e., 5 + Y = D. • If Y = 2 then D = 7. These values are possible. • Hence we get the final solution as given below and on backtracking, we may find more solutions. S = 9 ; E = 5 ; N = 6 ; D = 7 ; M = 1 ; O = 0 ; R = 8 ;Y = 2 C4 C3 C2 C1 Carry S E N D + M O R E _________________________________ M O N E Y _________________________________ Y = D + E → C1 E = N + R + C1 → C2 N = E + O + C2 → C3 O = S + M + C3 → C4 M = C4
  • 30. Constraints: Y = D + E C1 E = N + R + C1 C2 N = E + O + C2 C3 O = S + M + C3 C4 M = C4 Initial State M = 1 → C4 = 1 O = 1 + S + C3 O S = 9 S = 8 O C3 = 0 C3 = 1 O = 0 O = 1 Fixed  M = 1 O = 0 N = E + O + C2 = E + C2 → C2 = 1 (must) → N = E + 1 E = 2 E = 3 ….. E = 5 N = 3 N = 6 E = N + R + C1 E = N + R + C1 10 + 2 = 3 + R + C1 10 + 5 = 6 + R + C1 O  O R = 9 R = 8 R = 9 R = 8 C1 =0 C1 = 1 C1 = 0 C1 = 1  O  O 10 + Y = D + E = D + 2 10 + Y = D + E = D + 5 O O D = 8 D = 9 D = 7 Y = 0 Y = 1 Y = 2     The first solution obtained is: M = 1, O = 0, S = 9, E = 5, N = 6, R = 8, D = 7, Y = 2
  • 31. C4 C3 C2 C1  Carries B A S E + B A L L _________________________________ G A M E S _________________________________ Constraints equations are: E + L = S → C1 S + L + C1= E → C2 2A + C2 = M → C3 2B + C3 = A → C4 G = C4 Initial Problem State G = ?; A = ?;M = ?; E = ?; S = ?; B = ?; L = ?
  • 32. 1. G = C4  G = 1 2. 2B+ C3 = A → C4 2.1 Since C4 = 1, therefore, 2B+ C3 > 9  B can take values from 5 to 9. 2.2 Try the following steps for each value of B from 5 to 9 till we get a possible value of B. if C3 = 0 A = 0  M = 0 for C2 = 0 or M = 1 for C2 = 1  • If B = 5 if C3 = 1  A = 1  (as G = 1 already) • For B = 6 we get similar contradiction while generating the search tree. • If B = 7 , then for C3 = 0, we get A = 4  M = 8 if C2 = 0 that leads to contradiction, so this path is pruned. If C2 = 1, then M = 9 . 3. Let us solve S + L + C1 = E and E + L = S • Using both equations, we get 2L + C1 = 0  L = 5 and C1 = 0 • Using L = 5, we get S + 5 = E that should generate carry C2 = 1 as shown above • So S+5 > 9  Possible values for E are {2, 3, 6, 8} (with carry bit C2 = 1 ) • If E = 2 then S + 5 = 12  S = 7  (as B = 7 already) • If E = 3 then S + 5 = 13  S = 8. • Therefore E = 3 and S = 8 are fixed up. 4. Hence we get the final solution as given below and on backtracking, we may find more solutions. In this case we get only one solution. G = 1; A = 4; M = 9; E = 3; S = 8;B = 7; L = 5
  • 33. SHIWANI GUPTA 39 MARS Each of the ten letters (m, a, r, s, v, e, + VENUS n, u, t, and p) represents a unique number + URANUS in the range 0 .. 9. + SATURN ------------ NEPTUNE Solution: NEPTUNE = 1078610 M=4, A=5, R=9, etc.
  • 34. Water Jug Problem • Problem Statement: "You are given two jugs, a 4-gallon one and a 3-gallon one. Neither has any measuring markers on it. There is a tap that can be used to fill the jugs with water. How can you get exactly 2 gallons of water into the 4-gallon jug?" SHIWANI GUPTA 40
  • 35. Production Rules Rules Conclusions R1:(X, Y | X < 4) → (4, Y) {Fill 4-gallon jug} R2:(X, Y | Y < 3) →(X, 3) {Fill 3-gallon jug} R3:(X, Y | X > 0) →(0, Y) {Empty 4-gallon jug} R4:(X, Y | Y > 0) →(X, 0) {Empty 3-gallon jug} R5:(X, Y | X+Y >= 4 ΛY > 0) →(4, Y –(4 –X)) {Pour water from 3-gallon jug into 4- gallon jug until 4-gallon jug is full} R6:(X, Y | X+Y >= 3 ΛX > 0) →(X –(3 –Y), 3)) {Pour water from 4-gallon jug into 3- gallon jug until 3-gallon jug is full} R7:(X, Y | X+Y <= 4 ΛY > 0) → (X+Y, 0) {Pour all water from 3-gallon jug into 4- gallon jug } R8:(X, Y | X+Y <= 3 ΛX > 0) →(0, X+Y) {Pour all water from 4-gallon jug into 3- gallon jug } R9:(X, Y | X > 0) → (X –D, Y) {Pour some water D out from 4- gallon jug} R10:(X, Y | Y > 0) →(X, Y -D) {Pour some water D out from 3- gallon jug} SHIWANI GUPTA 41
  • 36. SHIWANI GUPTA 42 2 0 Number Rules applied 4-g jug 3-g jug of steps 1 Initial State 0 0 2 R1 {Fill 4-gallon jug} 4 0 3 R6 {Pour from 4 to 3-g jug until it is full } 1 3 4 R4 {Empty 3-gallon jug} 1 0 5 R8 {Pour all water from 4 to 3-gallon jug} 0 1 6 R1 {Fill 4-gallon jug} 4 1 7 R6 {Pour from 4 to 3-g jug until it is full} 2 3 8 R4 {Empty 3-gallon jug} Goal State Solution
  • 37. Water Jug Problem Given a full 5-gallon jug and a full 2-gallon jug, fill the 2-gallon jug with exactly one gallon of water. • State: ? • Initial State: ? • Operators: ? • Goal State: ? 5 2
  • 38. SHIWANI GUPTA 45 Real World problems • Route Finding applications, such as routing in computer networks, automated travel advisory systems, and airline travel planning systems. • Touring and traveling salesperson problem is a famous touring problem in which each city must be visited exactly once. The aim is to find the shortest tour. • VLSI layout with cell layout and channel routing. • Robot navigation is a generalization of the route-finding problem described earlier. Rather than a discrete set of routes, a robot can move in a continuous space with (in principle) an infinite set of possible actions and states. • Assembly sequencing of complex objects by a robot, the problem is to find an order in which to assemble the parts of some object. If the wrong order is chosen, there will be no way to add some part later in the sequence without undoing some of the work already done. • Monkey Banana Problem
  • 39. General Route Finding Problem • Problem Statement • States: Locations • Initial State: Starting Point • Successor Function(Operators): Move from one location to other • Goal Test: Arrive at certain location • Path Cost: Money, time, travel, comfort, scenery,… SHIWANI GUPTA 46
  • 40. Travelling Salesman Problem • Problem Statement • States: Locations/cities • Initial State: Starting Point • Successor Function(Operators): Move from one location to other • Goal Test:All locations visited, Agent at initial location • Path Cost: Distance between locations SHIWANI GUPTA 47
  • 41. VLSI layout problem • Problem Statement • States: Positions of components, wires on chip • Initial State: – Incremental – Complete State • Successor Function(Operators) – Incremental – Complete State • Goal Test: All components placed and connected as specified • Path Cost: distance, capacity, no. of connections per component SHIWANI GUPTA 48
  • 42. Robot Navigation • Problem Statement • States: Locations, Position of actuator • Initial State: Start pos • Successor Function(Operators): Movement, actions of actuators • Goal Test: Task Dependent • Path Cost: Distance, Energy consumption SHIWANI GUPTA 49
  • 43. Assembly Sequencing • Problem Statement • States: Location of components • Initial State: No components assembled • Successor Function(Operators): Place component • Goal Test: System fully assembled • Path Cost: Number of moves SHIWANI GUPTA 50
  • 44. Monkey Banana Problem • Problem Statement • States: • Initial State: Monkey on the floor without bananas • Successor Function(Operators) • Goal Test • Path Cost: The number of moves by monkey to get bananas SHIWANI GUPTA 51
  • 45. Search Problem • State space – each state is an abstract representation of the environment – the state space is discrete • Initial state • Successor function • Goal test • Path cost
  • 46. Search Problem • State space • Initial state: – usually the current state – sometimes one or several hypothetical states (“what if …”) • Successor function • Goal test • Path cost
  • 47. Search Problem • State space • Initial state • Successor function: – [state → subset of states] – an abstract representation of the possible actions • Goal test • Path cost
  • 48. Search Problem • State space • Initial state • Successor function • Goal test: – usually a condition – sometimes the description of a state • Path cost
  • 49. Search Problem • State space • Initial state • Successor function • Goal test • Path cost: – [path → positive number] – usually, path cost = sum of step costs – e.g., number of moves of the empty tile
  • 50. Assumptions in Basic Search • The environment is static • The environment is discretizable • The environment is observable • The actions are deterministic
  • 51. University Questions • Solve the following Crypt arithmetic problem: FORTY CROSS SEND BASE TEN EAT ROADS MORE BALL TEN THAT DANGER MONEY GAMES SIXTY APPLE • You are given 2 jugs of cap 4l and 3l each. Neither of the jugs have any measuring markers on them. There is a pump that can be used to fill jugs with water. How can u get exactly 2l of water in 4l jug? Formulate the problem in state space and draw complete diagram • Consider jugs of volumes 3 and 7 units are available. Show the trace to measure 2 and 5 units. • Solve Wolf Goat Cabbage problem.