0% found this document useful (0 votes)
36 views19 pages

2.classic AI Problems

The document discusses classic AI problems, including the Vacuum Cleaner and Water Jug problems. It outlines the problem statements, possible actions, and formulations for each problem, detailing the states, initial conditions, goal tests, and path costs. Additionally, it analyzes potential solutions for the Water Jug problem, emphasizing efficiency based on water availability.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views19 pages

2.classic AI Problems

The document discusses classic AI problems, including the Vacuum Cleaner and Water Jug problems. It outlines the problem statements, possible actions, and formulations for each problem, detailing the states, initial conditions, goal tests, and path costs. Additionally, it analyzes potential solutions for the Water Jug problem, emphasizing efficiency based on water availability.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

CLASSIC AI PROBLEMS

Classic AI Problems:
Vacuum cleaner problem
Water Jug problem
The Farmer ,Wolf ,Goat,and Cabbage Problem
8 puzzle problem
A travelling salesman problem
Tower of Hanoi
Monkeys and bananas
Chess etc
Vacuum Cleaner Problem
Problem Statement:
 This particular world has just two locations:
 Squares A
 Square B.
 The vacuum agent perceives which square it is in and
whether there is dirt in the square.
 It can choose to
 move left,
 move right,
 suck up the dirt,
 Do nothing.
Possible Actions:
One very simple agent function is the
following:
if the current square is dirty, then suck,
otherwise move to the other square.
Problem Formulation:
 States:
 The agent is in one of two locations, each of which might or might
not contain dirt.
 Thus there are 2 x 22 = 8 possible world states.

 Initial state:
 Any state can be designated as the initial state.

 Successor function:
 This generates the legal states that result from trying the three
actions (Left, Right, and Suck).
Problem Formulation:
 Goal test:
This checks whether all the squares are clean.

Path cost:
Each step costs 1, so the path cost is the
number of steps in the path.
Vacuum Agent Function
Vacuum World State Space Graph:
WATER JUG PROBLEM
Problem Statement:
We are given 2 jugs, a 4 liter one and a 3-
liter one. Neither has any measuring markers
on it.
 There is a pump that can be used to fill the
jugs with water.
How can we get exactly 2 liters of water in to
the 4-liter jugs?
Problem Formulation:
The state space for this problem can be defined as

{ ( i ,j ) i = 0,1,2,3,4 j = 0,1,2,3}

‘i’ = the number of liters of water in the 4-liter jug


‘j’ = the number of liters of water in the 3-liter jug.
The initial state is ( 0,0) that is no water on each jug.
The goal state is to get ( 2,n) for any value of ‘n’.
Assumptions:
 To solve this we have to make some assumptions not
mentioned in the problem. They are:

1. We can fill a jug from the pump.

2. we can pour water out of a jug to the ground.

3. We can pour water from one jug to another.

4. There is no measuring device available.


Production Rules:
Possible Solutions:

Solution 1
Solution 2
Solution 3
Analysis of Solution:
We see that, when there is no limit for water
prevails then solution is the most efficient.
When water is limited then Solution 2 is the
best suited.
In no way solution 3 is good, Because it
requires 8 steps for solution and wastes 5
liters of water.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy