download

Matakuliah
Tahun
Versi
: T0264/Intelijensia Semu
: Juli 2006
: 2/2
Pertemuan 18
Planning Continued
1
Learning Outcomes
Pada akhir pertemuan ini, diharapkan mahasiswa
akan mampu :
• << TIK-99 >>
• << TIK-99>>
2
Outline Materi
•
•
•
•
•
Materi 1
Materi 2
Materi 3
Materi 4
Materi 5
3
13.5. Nonlinear Planning Using …
• Nonlinear plan is plan that not composed of a
linear sequence of complete subplans.
• Nonlinear Planning Using Constraint Posting
because :
 Difficult problems cause goal interactions
 The operator used to solve one subproblem may
interfere with the solution to a previous
subproblem.
 Most problem require an intertwined plan in which
multiple subproblem are worked on simultaneously
4
A Slightly Harder Blocks Problem
C
A
B
• Start :
ON(C,A) 
ONTABLE(A) 
ONTABLE(B) 
ARMEMPTY
A
B
C
• Goal :
ON(A,B) 
ON(B,C) 
ONTABLE(C)
5
A Slightly Harder Blocks Problem
Penyelesaian yang baik adalah :
1. Mulai dengan goal ON(A,B) dengan
CLEAR(A) dan kemudian meletakan C di
meja.
2. Pencapaian ON(B,C) dengan meletakan
(STACK) B pada C.
3. Goal lengkap ON(A,B) dengan
meletakan (STACK) A pad B.
6
Idea Constraint Posting
• The idea of constraint posting is to build up a plan
by incrementally hypothesizing operators, partial
orderings between operators, and building of
variables within operators.
• At any given time in the problem-solving process,
we may have a set of useful operators but perhaps
no clear idea of how those operator should be
ordered with respect to each other.
• A solution is a partially ordered, partially
instantiated set of operator; to generate an actual
plan, we convert the partial order into any of a
number of total order.
7
Constraint Posting versus State Space Search
8
Constraint Posting versus State Space Search
9
Non Linear to Solve the anomaly problem
1. Step addition – creating new steps for a plan.
2. Promotion – constraining one step to come
before another in a final plan.
3. Declobbering – placing one (possibly new) step
s2 between two old steps s1 and s3, such that
s2 reasserts some precondition of s3 that was
negated (or “clobbered”) by s1.
4. Simple establishment – assigning a value to a
variable, in order to ensure the preconditions of
some step.
5. Separation – preventing the assignment of
certain values to a variable.
10
Algorithm : Nonlinear Planning (TWEAK)
1.
2.
3.
4.
5.
6.
Initialize S to be the set of propositions in the goal state.
Removed some unachieved proposition P from S.
Achieve P by using step addition, promotion,
declobbering, simple establishment, or separation.
Review all the steps in the plan, including any new steps
introduced by step addition, to see if any of their
preconditions are unachieved. Add to S the new set on
unchieved preconditions.
If S is empty, complete the plan by converting the partial
order of the steps into a total order, and instantiate any
variables as necessary.
Otherwise, go to step 2.
11
Constraint Posting
• Heuristic for planning using constraint posting
(TWEAK)
CLEAR(B)
*HOLDING(A)
STACK(A,B)
ARMEMPTY
ON(A,B)
CLEAR(B)
HOLDING(A)
CLEAR(C)
*HOLDING(B)
STACK(B,C)
ARMEMPTY
ON(B,C)
CLEAR(C)
HOLDING(B)
12
PENJELASAN
• Setiap step dibedakan atas precondition di bagian
atas dan postcondition dibawahnya.
• Simbol negasi () digunkan untuk menghilangkan
precondition.
• Simbol star ( * ) untuk unachieved precondition.
• Step addition adalah step tabahan yang dipasang
untuk mencapai goal.
• Untuk mencapai precondition, misal CLEAR(B)
digunakan heuristic yang disebut promotion.
• Declobbering digunakan untuk mencapai
precondition *ARMEMPTY pada step PICKUP(A).
• Constrain posting dipakai untuk menciptakan plan
yang tidak lengkap antar step yang dijalankan. 13
Constraint Posting
Plan ordering and variable binding constraints to
build a concrete plan :
•
•
•
•
•
•
UNSTACK(C,A)
PUTDOWN(C)
PICKUP(B)
STACK(B,C)
PICKUP(A)
STACK(A,B)
14
Constraint Posting
• Menggunakan four different heuristics untuk
sintesa yang berisi : step addition, promotion,
declobbering and simple establishment disebut
plan modification operation.
• Dibutuhkan satu perlakuan yaitu : separation.
15
Separation
• The modal truth criterion for telling whether proposition P
necessary hold in state S.
16
CONTOH CONSTRAINT POSTING
A
C
C
D
B
D
B
A
• Start :
ON(A,B) 
ON(C,D) 
ONTABLE(B) 
ONTABLE(D) 
ARMEMPTY
• Goal :
ON(C,B) 
ON(D,A) 
ONTABLE(B) 
ONTABLE(A)
17
CONTOH CONSTRAINT POSTING
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
CLEAR(A)
UNSTACK(A,B)
PUTDOWN(A)
ARMEMPTY
CLEAR(C)
UNSTACK(C,D)
HOLDING(C)
STACK(C,B)
CLEAR(D)
PICKUP(D)
STACK(D,A)
ARMEMPTY
18
<< CLOSSING >>
End of Pertemuan 18
Good Luck
19