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

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

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

1

Pertemuan 17Planning

Matakuliah : T0264/Intelijensia Semu

Tahun : Juli 2006

Versi : 2/1

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

2

Learning Outcomes

Pada akhir pertemuan ini, diharapkan mahasiswa

akan mampu :

• << TIK-99 >>

• << TIK-99>>

Page 3: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

3

Outline Materi

• Materi 1

• Materi 2

• Materi 3

• Materi 4

• Materi 5

Page 4: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

5

Overview

• Decomposability

• Predictability

• Plan failures

• Planning vs. doing

Page 6: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

9

The Blocks World

• A Simple Blocks World Description

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

Page 10: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

12

The Blocks World

• A Simple Search Tree

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

Page 13: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

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: 1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.

27

<<Closing >>

End of Pertemuan 17

Good Luck