Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 16

Planning problem

Planning problem in AI

• Problem solving – Search through a state space.


• Planning – Problem solving in advance.
• The planning problem in Artificial Intelligence is about the decision making
performed by intelligent systems like robots, humans or computer programs in the
pursuit of achieving a goal.
• It involves choosing a sequence of actions that will transform the state of the world
step by step to achieve the goal.

• Planning- Set of actions


• Action- Precondition: For actions to be performed there is no need for preconditions.
Effect: Effect is the result of actions performed.
The general approach in planning

1. Choose the best rule.


2. Applying rule on the problem to get a new state.
3. Detect if solution is found.
4. Detect the goal state to check for the other possibilities in a new direction.
STRIPS in Artificial Intelligence

• After planning problem, it is required to solve the problem and to solve that
problem a problem planning language or technique is required.

• Planning languages are known as action language.

• STRIPS is a technique/Language that works as an automated planner.


• STRIPS stands for Stanford Research Institute Problem Solver.
• It’s an automated planning technique for finding goals by executing a domain
from the initial state.
Hill Climbing algorithm - Blocks World Puzzle
• The block world problem is one of the most famous planning domains in artificial intelligence.

• Blocks world problems and solutions are proved useful to teach robots to stack and unstack
things to get desired result.

• The goal is to build one or more vertical stacks of blocks, turn the initial state into the goal state.

Conditions:
1. Only one block may be moved at a time.
2. It may be placed either on the table or on top of another block.
3. A block may not be moved if there is another block on top of it.
Example of Block World Puzzle

Initial description:
 Block: Similar sized Squared blocks
On(A,D,C,B)
that can be stacked on one another.

 Flat surface(Table)

 Robotic Arm

 Stack: A natural structure for piles


of blocks. Goal description:
On(D,C,B,A)
Rules to provide solution for Block Puzzle Problem
Basic operations:
Solution using Hill climbing Local Heuristic function and
global heuristic function
• The selection of operators is based on either:
Local Heuristic function: Local situation
Considering only the immediate consequences to decide on the next.
• Generates value not using overall situation but local situation.

Global Heuristic function: Global information

• The function chosen takes the overall situation and not confined to local
parameters.
• Has more chances to reach to a final state.
Solution using Local Heuristic Function

Local heuristic:
• +1 for each block that is resting on the thing it is supposed to be resting on.
• -1 for each block that is resting on a wrong thing.

Local heuristic function: Start state

-1 +1
0 +1 4 +1
+1 +1
-1 +1
Hill climbing: Local Heuristic function

• Operator 1: Move A on the table

+1
+1 +1
-1

• Operator 2: Move D on the table or on A


Local optimum
Plateaus and Ridges
Solution using Global heuristic function

The goal is to make -6 operator to +6

-3 3
-6 -2 6 2
-1 1
0 0

For each block that has the correct support structure: +1 to every block in the support structure.

For each block that has a wrong support structure: -1 to every block in the support structure.
.

Operator 2: Bring D down on the Operator 3: Bring C down on the table.


Operator 1: Bring A down on the table.
table.

-6 -3 -1 0
-2
-1 -1 0 0 0 0
0 0 0 0 0

1 3
3
2 2
+1 0 0 1 1 6
0 0 0 0
Heuristic Performance Comparison

Comparing blocks world heuristics based on the number of blocks out of place.

• A heuristic that attempts to be more informed than the number of blocks out of
place.
• A heuristic that attempts to be very informed.
Find the shortest distance for the given configuration of Blocks World
Problem
a

You might also like