Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture Notes on AI-NN Chapter 5 Information Processing & Utilization.

Similar presentations


Presentation on theme: "Lecture Notes on AI-NN Chapter 5 Information Processing & Utilization."— Presentation transcript:

1 Lecture Notes on AI-NN Chapter 5 Information Processing & Utilization

2 Categories of Information Processing -- Problem-Solving -- Game-Playing -- Theorem-Proving -- Logic-Deduction

3 Section 5.1 Problem-Solving §5-1 Introduction Description of a problem: Problem defining: the start - goal conditions Rule defining: a set of IF-THEN Strategy-finding: rule-application controlling

4 Example The Water Jug Problem Initial Base: There are 2 jugs, a 4-kilo jug and a 3-kilo jug. Neither has any measurement marks on it. Rule Base: (1) There is a pump that can be used to fill the jug with water, or (2) You can pour water from jug on the ground or into another jug. Question: How to get exactly 2-kilo of water into the 4-kilo jug ?

5 Representation and Solution: Kilos in 4-kilo jug kilos in 3-kilo jug 0 0 0 3 3 0 3 3 4 2 0 2 2 0 R1 R2 R1 3 R2 1 2 2

6 It is clear that the Production System is suitable means of representation for Problem-Solving. Procedure PRODUCTION 1. DATA initial database 2. Until DATA satisfies the termination condition, do: i) begin ii) select some rule, R, in the set of rules that can be applied to DATA iii) DATA result of applying R to DATA

7 In most of AI applications, the information available to the control strategy is usually not sufficient to permit selection of the most appropriate rule on every stage. The operation of AI production system can thus be characterized as a SEARCH PROCESS in which rules are tried until some sequence of them is found that produces a database satisfying the termination condition Further, if the database of the problem to be solved is represented by means of graph, the search is called GRAPH-SEARCH.

8 Procedure GRAPH-SEARCH 1. Create a search graph, G, consisting sole of the start node, S. Put S on OPEN (OPEN: a list of nodes just generated but not examined yet). 2. Create a list, CLOSED, that is initially empty. (CLOSED is a list of nodes examined already) 3. LOOP: if OPEN is empty, exit with failure. 4. Select the first node on OPEN, remove it from OPEN to CLOSED, Call it node n. 5. Examine n: if n is a goal node, exit with success. The solution is obtained by tracing a path along the pointers from n back to S in G.

9 6. Expand n (Apply a rule to n), generating the set, M, of its successors that are not ancestors of n. Install these members of M as successors of n. 7. Establish a pointer to n from these members of M that were not already on either OPEN or CLOSED. Add there members of M to OPEN. For each member of M that was already on OPEN or CLOSED, decide whether or not to redirect its pointer to n. For each member of M already on CLOSED, decide for each of its descendants in G whether or not to redirect its pointer. 8. Reorder the list OPEN according to a certain rule. 9. Go LOOP

10 S Node on CLOSED Node on OPEN 1=n 2 3 5 4 6 Pointers need to be redirected to Redirection

11 The crucial factor in search process is the ordering regulation that determines the fashion of the selection of nodes for expansion next. The search efficiency is dependent on the utility of problem information in node selection. In accord with the utility of problem information in node selection, search strategy can be divided into: a) Blind Search, and b) Heuristic Search

12 §5-1-1 Blind Search on Tree 1) Breadth-First Search Node ordering: FIFO Procedure BFS 1. Put start node s on OPEN. Set pointer P=0 2. If OPEN=NIL, failure. 3. Select the first node on OPEN. Put it on CLOSED, Call it node n. 4. If n=g, successful. The solution is obtained by tracing a path along the pointers from g to s in G. 5. Expand n. If it has no successors, go to step 2. Or, generate all its successors, add them successively to the end on OPEN, and establish pointers from them to n; go to step 2.

13 Example: BFS 123 8 4 765 283 164 7 5 1=S 46=g 283 164 75 283 164 75 283 1 4 765 283 64 175 2 3 4 5 6 7 8 9 1011 34 35 36 3738 283 14 765 2 3 184 765 283 14 765 283 16 754 19 See Nilsson p.71 Fu p.37 The shortest solution path 453944 20 33

14 Comments on BFS: It is guaranteed to find a optimal solution because of its systematic search feature. The major weakness with BFS is its inability to use the information related to the problem and thus a) It requires a large memory to store the great number of the nodes; b) It require a great amount of work to examine the great number of the nodes c) As result, BFS has low efficiency of search.

15 § 5-1-2 Depth First Search: Node Ordering: LIFO Procedure DFS 1. Put start node s on OPEN. Set d(s)=0, P=0 2. If OPEN=NIL, F. 3. Select the first node on OPEN. Put it on CLOSED. Call it node n. 4. If n=g, S. 5. If d(n)=d, go to step 2. 6. If n is unexpandable, go to step 2. 7. Expand node n, generating all its successors. Establish pointers from them to n. Let d(successor)=d(n)+1. Add them to the front on OPEN in any order, then go to step 2. B

16 Example: DFS d =5 283 184 765 283 164 7 5 1=S 283 164 75 283 164 75 283 1 4 765 283 64 175 2 3 4 5 67 8 9 1011 283 14 765 2 3 765 283 714 765 283 14 765 See Nilsson p.70 Fu p.42 The solution path B 83 264 175 18 83 264 175 863 2 4 175 8 3 264 175 12 1314 15 1617 83 214 8 3 214 83 214 813 2 4 765 19 20 21 2223 6 4 175 684 175 23 684 175 23 684 175 64 175 28 643 175 283 645 17 283 674 1 5 283 674 15 283 674 15 2 3 765 283 65 283 714 6 5 283 7 4 615 283 714 65 123 8 4 765 123 784 65 8 4 23 184 765 123 84 765 24 25 2627 28 29 30 31

17 Compared with BFS, DFS has the following features: 1) If d is too small, the goal node may be missed, if too large, the greater amount of storage is needed. 2) DFS may find the goal faster than BFS, while the the solution path may not be the shortest one if there are more than one goal node. 3) DFS can often be carried out using a reasonably small amount of storage. B g g

18 §5-1-3 Informed (Heuristic) Search on Tree (1) General Remarks -- The weakness in blind search: ignoring the information associated with the problem in selecting node for expansion next. -- Solution: Try to use the heuristic information in node ordering on OPEN -- Heuristic Search. -- The heuristic information is used in terms of Evaluation Function, f(.): f(n): node n Real number mapping nodes to their promising values.

19 For any node n on a tree, let g*(n) be the actual cost of a minimal cost path from s to n. h*(n) be the cost of minimal cost path from n to g. f*(n) = g*(n) + h*(n) be the cost of an optimal path from s to g constrained to going through n. Let again g be an estimation of g*, h be an estimation of h*, and f(n) = g(n) + h(n) be an estimation of f*(n), which can be used as an evaluation function for ordering nodes on OPEN.

20 Practically, g(n): the sum of the arc costs encountered while tracing the pointers from n to s.h h(n): a function based on heuristic information from the problem, hence is called Heuristic Function. The practical regulation is If h(n) is very high, node n may be ignored; If h(n) is low, node n may be chosen to expand next.

21 (2) Algorithm A and Algorithm A* on Tree Algorithm A is a special Tree-Search using evaluation function f(n) for ordering nodes on OPEN and always selecting for expansion the node with the lowest value of f(n).


Download ppt "Lecture Notes on AI-NN Chapter 5 Information Processing & Utilization."

Similar presentations


Ads by Google