27
1 Pertemuan 17 Planning Matakuliah : T0264/Intelijensia Semu Tahun : Juli 2006 Versi : 2/1

Pertemuan 17 Planning

  • Upload
    ludwig

  • View
    52

  • Download
    1

Embed Size (px)

DESCRIPTION

Pertemuan 17 Planning. Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1. Learning Outcomes. Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : > >. Outline Materi. Materi 1 Materi 2 Materi 3 Materi 4 Materi 5. 13.1. Overview. - PowerPoint PPT Presentation

Citation preview

Page 1: Pertemuan 17 Planning

1

Pertemuan 17Planning

Matakuliah : T0264/Intelijensia Semu

Tahun : Juli 2006

Versi : 2/1

Page 2: Pertemuan 17 Planning

2

Learning Outcomes

Pada akhir pertemuan ini, diharapkan mahasiswa

akan mampu :

• << TIK-99 >>

• << TIK-99>>

Page 3: Pertemuan 17 Planning

3

Outline Materi

• Materi 1

• Materi 2

• Materi 3

• Materi 4

• Materi 5

Page 4: Pertemuan 17 Planning

4

13.1. Overview

• Often the problem that must be solved is divided into smaller pieces and to solve those pieces separately.

• The word Planning refers to the process of the computing several steps of the problem-solving procedure before executing any of them.

• This methods focus on way of decomposing the original problem into appropriate subparts and on way of recording and handling interactions among the subparts as they are detected during the problem-solving process.

Page 5: Pertemuan 17 Planning

5

Overview

• Decomposability

• Predictability

• Plan failures

• Planning vs. doing

Page 6: Pertemuan 17 Planning

6

Components of a Planning System

• Choose the best rule to apply next based on the best available heuristic information.

• Apply the chosen rule to compute the new problem state that arises from its application.

• Detect when a solution has been found.• Detect dead ends so that they can be

abandoned and the system’s effort directed in more fruitful directions.

• Detect when an almost correct solution has been found and employ special techniques to make it totally correct.

Page 7: Pertemuan 17 Planning

7

13.2. An Example Domain

The Blocks WorldOperators :• UNSTACK(A,B) Pick up block A from its current

position on block B. The arm must be empty and block A must have no blocks on top of it.

• STACK(A,B) Place block A on block B. The arm must already be holding A and the surface of B must be clear.

• PICKUP(A) Pick Up block A from the table and hold it. The arm must be empty and there must be nothing on top of block A.

• PUTDOWN(A) Put block A down on the table. The arm must have been holding block A.

Page 8: Pertemuan 17 Planning

8

The Blocks World

Predicates :• ON(A,B) Block A is on block B.• ONTABLE(A) Block A is on the table.• CLEAR(A) There is nothing on top of block A.• HOLDING(A) The arm is holding block A.• ARMEMPTY The arm is holding nothing.

Inference rules :• - x : HOLDING(x) ARMEMPTY• - x : ONTABLE(x) Y : y ON(x,y)• - x : y : ON(y,x) CLEAR(x)

Page 9: Pertemuan 17 Planning

9

The Blocks World

• A Simple Blocks World Description

ON(A,B,S0)ONTTABLE(B,S0)CLEAR(A,S0)

Page 10: Pertemuan 17 Planning

10

The Blocks World

• STRIPS-Style Operators for the Blocks World

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) ARMEMPTYD : ON(x,y) ARMEMPTYA : HOLDING(x) CLEAR(y)

PICKUP(x)P : CLEAR(x) ONTABLE(x) ARMEMPTYD : ONTABLE(x) ARMEMPTYA : HOLDING(x)

PUTDOWN(x)P : HOLDING(x)D : HOLDING(x)A : ONTABLE(x) ARMEMPTY

Page 11: Pertemuan 17 Planning

11

The Blocks World

We start with the situation shown and we would describe it as:

ON(A,B) ONTABLE(B) CLEAR(A)

After applying the operator UNSTACK(A,B), our description of the world would be :

ONTABLE(B) CLEAR(A) CLEAR(B) HOLDING(A)

A

B

Page 12: Pertemuan 17 Planning

12

The Blocks World

• A Simple Search Tree

ONTABLE(B) CLEAR(A) CLEAR(B) ONTABLE(A)

Page 13: Pertemuan 17 Planning

13

13.4. Goal Stack Planning

• Goal stack planning is one of the earliest techniques to be developed for solving compound goal that may interact was the use of a goal stack.

• This was the approach used by STRIPS.

• The problem solver makes use of a single stack that contains both goals and operator that have been proposed to satisfy those goals.

Page 14: Pertemuan 17 Planning

14

Goal Stack Planning

• The goal-stack planning method attacks problem involving conjoined goal by solving the goal one at a time, in order.

• A plan generated by this method contains a sequence of operators of operator for attaining the first goal, followed by a complete sequence for the second goal, etc.

Page 15: Pertemuan 17 Planning

15

Goal Stack Planning

• A Very Simple Blocks World Problem

Start : ON(B,A) Goal : ON(C,A) ONTABLE(A) ON(B,D) ONTABLE(C) ONTABLE(A) ONTABLE(D) ONTABLE(D) ARMEMPTY

Page 16: Pertemuan 17 Planning

16

Goal Stack Planning

• Initial goal stack :

ON(C,A) ON(B,D) ONTABLE(A) ONTABLE(D)

• Choose to work on ON(C,A) before ON(B,D) :

ON(C,A) ON(B,D) ON(C,A) ON(B,D) OTAD

• Achieve ON(C,A) with STACK(C,A) :

STACK(C,A) ON(B,D) ON(C,A) ON(B,D) OTAD

Page 17: Pertemuan 17 Planning

17

Goal Stack Planning

• Add STACK’s preconditions :

CLEAR(A) HOLDING(C) CLEAR(A) HOLDING(C) STACK(C,A) ON(B,D) ON(C,A) ON(B,D) OTAD

Page 18: Pertemuan 17 Planning

18

Goal Stack Planning

• Achieve CLEAR(A) with UNSTACK(B,A) :

ON(B,A) CLEAR(B) ARMEMPTY ON(B,A) CLEAR(B) ARMEMPTY UNSTACK(B,A) HOLDING(C) CLEAR(A) HOLDING(C) STACK(C,A) ON(B,D) ON(C,A) ON(B,D) OTAD

Page 19: Pertemuan 17 Planning

19

Goal Stack Planning

• Now the top element of the stack is the operator UNSTACK(B,A).

• Now guaranteed that its preconditions are satisfied, so it can be applied to produce a new world model from which the rest of the problem-solving process can continue.

• Meanwhile we record that UNSTACK(B,A) is the first operator of proposed solution sequence.

• At this point, the database corresponding to the world model is :

• ONTABLE(A) ONTABLE(C) ONTABLE(D) HOLDING(B) CLEAR(A)

Page 20: Pertemuan 17 Planning

20

Goal Stack Planning

• The goal stack now is :

HOLDING(C)

CLEAR(A) HOLDING(C)

STACK(C,A)

ON(B,D)

ON(C,A) ON(B,D) OTAD

Page 21: Pertemuan 17 Planning

21

Goal Stack Planning

• Achieve HOLDING(C) with PICKUP(C)

ONTABLE(C) CLEAR(C) ARMEMPTY ONTABLE(C) CLEAR(C) ARMEMPTY PICKUP(C) CLEAR(A) HOLDING(C) STACK(C,A) ON(B,D) ON(C,A) ON(B,D) OTAD

Page 22: Pertemuan 17 Planning

22

Goal Stack Planning

• Achieve HOLDING(C) with UNSTACK(C,x)

ON(C,x) CLEAR(C) ARMEMPTY ON(C,x) CLEAR(C) ARMEMPTY UNSTACK(C,x) CLEAR(A) HOLDING(C) STACK(C,A) ON(B,D) ON(C,A) ON(B,D) OTAD

x = any block from which C could be unstack.

Page 23: Pertemuan 17 Planning

23

Goal Stack Planning

• Achieve ON(C,x) by STACK(C,x) :

CLEAR(x) HOLDING(C) CLEAR(x) HOLDING(C) STACK(C,x) CLEAR(C) ARMEMPTY ON(C,x) CLEAR(C) ARMEMPTY UNSTACK(C,x) CLEAR(A) HOLDING(C) STACK(C,A) ON(B,D) ON(C,A) ON(B,D) OTAD

Page 24: Pertemuan 17 Planning

24

Goal Stack Planning

• Teminate path because HOLDING(C) is duplicated.• Achieve HOLDING(C) with PICKUP, not UNSTACK :

ONTABLE(C) CLEAR(C) ARMEMPTY ONTABLE(C) CLEAR(C) ARMEMPTY PICKUP(C) CLEAR(A) HOLDING(C) STACK(C,A) ON(B,D) ON(C,A) ON(B,D) OTAD

Page 25: Pertemuan 17 Planning

25

Goal Stack Planning

• Pop ONTABLE(C) and CLEAR(C), and achieve ARMEMPTY by STACK(B,D) :

CLEAR(D) HOLDING(B) CLEAR(D) HOLDING(B) STACK(B,D) ONTABLE(C) CLEAR(C) ARMEMPTY PICKUP(C) CLEAR(A) HOLDING(C) STACK(C,A) ON(B,D) ON(C,A) ON(B,D) OTAD

Page 26: Pertemuan 17 Planning

26

Goal Stack Planning

• Pop entire stack, and return plan :

1. UNSTACK(B,A)

2. STACK(B,D)

3. PICKUP(C)

4. STACK(C,A)

Page 27: Pertemuan 17 Planning

27

<<Closing >>

End of Pertemuan 17

Good Luck