Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Pertemuan 2 PROBLEMS, PROBLEM SPACES, AND SEARCH Matakuliah: T0264/Inteligensia Semu Tahun: 2005 Versi: 1/0.

Similar presentations


Presentation on theme: "1 Pertemuan 2 PROBLEMS, PROBLEM SPACES, AND SEARCH Matakuliah: T0264/Inteligensia Semu Tahun: 2005 Versi: 1/0."— Presentation transcript:

1 1 Pertemuan 2 PROBLEMS, PROBLEM SPACES, AND SEARCH Matakuliah: T0264/Inteligensia Semu Tahun: 2005 Versi: 1/0

2 2 Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : >

3 3 Outline Materi Materi 1 Materi 2 Materi 3 Materi 4 Materi 5

4 4 Building a Problem-Solving Program Define the problem precisely Analyze the problem Represent the task knowledge Choose and apply representation and reasoning technique

5 5 2.1 Defining the Problem as a State Space Search One Legal Chess Move

6 6 Another Way to Describe Chess Moves White pawn at Square(file e, rank 2) AND Square(file e, rank 3) is empty AND Square(file e, rank 4) is empty Move pawn from Square(file e, rank 2) TO Square(file e, rank 4)

7 7 A Water Jug Problem

8 8 Production Rules for the Water Jug Problem

9 9

10 10 One Solution to the Water Jug Problem Tic Tac Toe Gallon in the 4-gallon JugGallon in the 3-gallon JugRule Applied or or 11 20

11 11 To Specify a Problem Define the state space Specity the initial states Specify the goal states Specify the operations

12 Production Systems A set of rules Knowledge / database A control strategy A rule applier

13 Control Strategies Algorithm : Breadth – First Search 1.Set Node-List to the initial state 2.Until a goal is found or Node-List is empty do : a.Remove the first element of Node-List and call it E.If Node-List was empty,quit b.For each rule match againtst E do : Apply the rule to generate a new state If the nem state is a goal, quit and return it Else,add the new state to the end of Node-List

14 14 Two level of a Breadth-First Search Tree

15 15 Algorithm : Dept-First Search 1.If the initial state is a goal state, quit and return succes 2.Otherwise,do the following until succes or failure is signaled : a.Generate a successors,E,of the initial state.If there are no more successors,signal failure b.Call Depth-First Search with E as the initial state c.If succes is returned,signal success. Otherwise continue in this loop

16 16 A Depth-First Search Tree

17 Heuristic Search Some Simple Heuristic Functions ChessThe material advantage of our side over the opponent Travelling Salesman The sum of the distances so for Tic-Tac-Toe1 for each row in which we could win and in which we already have one piece plus 2 for each such row in which we have two pieces

18 Problem Characteristics –Is the problem decomposable ? –Can solution steps be ignored or undone ? –Is the problem’s universe predictable? –Is a good solution absolute or relative ? –Is the desired solution a state of the world or a path to a state ? –Is a large amount of knowledge absolutely required to solve the problem, or is it important only to constrain the search ? –Must problem-solving be interactive?

19 Production System Characteristics The four Categories of Production Systems MonotonicNonmonotonic Partially commutativeTheorem provingRobot navigation Not Partially commutative Chemical syntesisBridge

20 Design of Search Programs A Search Graph for the Water Jug Problem (4,0) (0,0) (0,3) (1,3) (4,3)(3,0)

21 Additional Problems –The Missionarries and Cannibals –The Tower of Hanoi –The Monkey and Bananas –Cryptarithmetic

22 22 >


Download ppt "1 Pertemuan 2 PROBLEMS, PROBLEM SPACES, AND SEARCH Matakuliah: T0264/Inteligensia Semu Tahun: 2005 Versi: 1/0."

Similar presentations


Ads by Google