unit5_Planning
unit5_Planning
Chapter 5:
Artificial Intelligence (UCS411)
Chapter Content
• Planning as search
• Partial order planning
• Construction and use of planning graphs
• Existing expert systems like MYCIN, RI, Expert system shells.
Summary
• Planning is arranging a sequence of actions to achieve a goal
• Each action has its own set of preconditions
• All the preconditions to be satisfied before performing the action
• Some effects can be either positive or negative
Types of Planning in AI
1 Classical planning
• fully observable, deterministics, finite, static and discrete
2 Nonclassical planning
• Partially observable or stochastic ennvironment
• The nonclassical planning involves a different set of algorithms
and agent designs
Objects
• Blocks: A,B,C
• Table: Table
Predicates
• (On A, B),(On C, table),Clear (B), (arm-empty), (holding C)
• (On table A), (On A, C), (top B),....
States-Conjunctive
• (On A, B) and (On B, C) and (clear A) and (on C table) and
(arm-empty)
STACK(A, B)
• put block A on block B
• The arm must already be holding A
• the surface of B must be clear
PICKUP(A)
• pickup block A from the table
• The arm must be empty and there must be nothing on top of A
• the surface of B must be clear
PUTDOWN(A)
• put block A on the table
• The arm must have been holding block A
∀x: ONTABLE(x)→¬∃y:ON(x,y)
If a block is on the table, then it is not also on another block
∀x:[¬∃y:ON(y,x)]→CLEAR(x)
Any block with no blocks on it, is clear
I. Green Approach
Basically, a given state was described by a set of predicates representing the facts that were
true in that state. Each state was represented explicitly as part of the predicate. A simple
blocks world description
[CLEAR(x, s)∧ ON(x, y, s)]→ [HOLDING(x, Do(UNSTACK(x, y), S)]∧ CLEAR(y, Do(UNSTACK(x, y),
S))
HOLDING(A, S1 ) ∧ CLEAR(B, S1 )
PRECONDITION
PRECONDITION: list of predicates that must be true for an
operator to be applied.
Effect
ADD: list of new predicates that an operator causes to become
true.
DELETE: list of old ppredicates that an operator causes to become
false.
STACK(X,Y)
P: CLEAR(Y)∧ HOLDING(X)
D: CLEAR(Y)∧HOLDING(X)
A: ARMEMPTY ∧ON(x, y)
UNSTACK(X,Y)
P: ON(x, y)∧ CLEAR(X)∧ARMEMPTY
D: ON(x,y)∧ ARMEMPTY
A: HOLDING(x) ∧CLEAR(y)
PICKUP(X)
P: CLEAR(x)∧ONTABLE(x)∧ARMEMPTY
D: ONTABLE(x)∧ARMEMPTY
A: HOLDING(x)
PUTDOWN(X)
P: HOLDING(x)
D: HOLDING(x)
A: ONTABLE(x)∧ARMEMPTY
Precondition
Precondition: armempty ∧ clear(C)
• Action (Fly(p,from,to))
• At(p,from)∧ Plane(p)∧Airport(from)∧ Airport(to)
• ¬At(p, from)∧At(p,to)
Basic Idea to handle interactive compound goals uses goal stacks, Here the stack contains :
• Goals
• Operators- ADD, DELETE and PREREQUISITE lists
• A database maintaining the current situation for each operator used.
start state
ON(B,A)∧ONTABLE(A) ∧ONTABLE(C)∧ONTABLE(D)∧ARMEMPTY
Goal State
ON(C,A)∧ON(B,D)∧ONTABLE(A)∧ONTABLE(D)
ON(C,A)
ON(B,D)
ON(C,A) ∧ ON(B,D) ∧ONTABLE(A) ∧ONTABLE(D)
ON(B,D)
ON(C,A)
ON(C,A) ∧ ON(B,D) ∧ONTABLE(A) ∧ONTABLE(D)
Mycin was one of the earliest expert systems, and its design has strongly influenced the
design of commercial expert systems and expert system shells.
Intro
• Mycin was an expert system developed at Stanford in the 1970s.
• Its job was to diagnose and recommend treatment for certain blood infections.
• To do the diagnosis “properly”, it involves growing cultures of the infecting
organism.
• Unfortunately this takes around 48 hours, and if doctors waited until this was
complete their patient might be dead!
• So, doctors have to come up with quick guesses about likely problems from the
available data, and use these guesses to provide a “covering” treatment where
drugs are given which should deal with any possible problem.
• Mycin was developed partly in order to explore how human experts make these
rough (but important) guesses based on partial information.
Mycin represented its knowledge as a set of IF-THEN rules with certainty factors. The
following is an English version of one of Mycin’s rules:
Mycin Rules
IF the infection is pimary-bacteremia
AND the site of the culture is one of the sterile sites
AND the suspected portal of entry is the gastrointestinal tract
THEN there is suggestive evidence (0.7) that infection is bacteroid.
The 0.7 is roughly, the certainty that the conclusion will be true given the evidence.
If the evidence is uncertain the certainties of the bits of evidence will be combined with the
certainty of the rule to give the certainty of the conclusion.
Assignement
1 Discuss the role of RI Expert System Shell along with its logic.
2 Provide the benefits of Expert System Shell and its application
area.
3 Discuss the role of Tuple in planning with 3 examples.
4 Discuss the role of planning graph for block world problem.