Download presentation
Presentation is loading. Please wait.
1
Solutions Midterm 2004
2
Search Heuristics (1) f(n) = g(n) +h(n) Explanation: –g(n) measures the cost of the optimal path from the start node to n that is actually known when the algorithm is performed –h(n) is an estimate of the costs to a terminal node from n.
3
Search Heuristics (2) The function h(n) is optimistic if it never overestimates the real optimal costs, i.e. 0 h(n) h*(n), where h*(n) are the optimal costs from n to a terminal node. One can obtain optimistic estimates by allowing illegal actions. This can be done in different ways, e.g. by –Dropping a precondition of the action –Inserting a new edge in the graph.
4
h(e) 7 4 2 3 4 5 start goal 2 2 2 3 3 2 2 5 2 f e s a t g b c d 4 Example Search
5
a s e f(a) = 7f(e) = 9 b c d f g t f(b) = 8 f(f) = 11 f(g) = 11 f(c) = 10 f(d) = 12 22 5 2 2 2 2 3 3 The right path is optimal Order of nodes: a, b, e, c, f, g
6
Typical Errors There where no real errors. It was only important that the descriptions were precise.
7
Predicate Logic: Problem
8
Representation in Predicate Logic Language elements: –Constant: Bill –Variable: x (can be any variable) –Function: Father_of(.) –Predicates: Rich(.), Son_of(.,.) Formalization: –Rich(Father_of(Bill)) – x(Rich(x) y(Son_of(y, x) Rich(y))) – x(Rich(Father_of(x)) Rich(x)) –Rich(Bill)
9
Logical Consequences Rich(Bill) is NOT a logical consequence of Rich(Father_of(Bill)) and x(Rich(x) y(Son_of(y, x) Rich(y))) because there is no relation between father and son explicitly mentioned. However, Rich(Bill) is a logical consequence of Rich(Father_of(Bill)) and x(Rich(Father_of(x)) Rich(x)) [Reason: Instantiate the x to Bill and get Rich(Father_of(Bill)) Rich(Bill) and then use Rich(Father_of(Bill))]
10
Typical Errors There were some pitfalls: Son_of is a relation and father_of is a function Someone refers to an arbitrary person, therefore it is a universal and not an existential quantifier Logical consequences must employ knoweldge that is not formulated
11
The Planning Problem PickUpBlock(x,y,z) *prec..: Clear(x) Handempty(z) effects: +Holding(x,z) +Clear(y) -On(x,y) -Handempty(z) PutDownBlock(x,y,z) prec..: Clear(y) Holding(x,z) effects: +On(x,y) +Handempty(z) -Holding(x,z) -Clear(y)
12
PickUpBlock(x,y,z) *prec..: Clear(x) Handempty(z) effects: +Holding(x,z) +Clear(y) -On(x,y) -Handempty(z) PutdownBlock(x,y,z) prec..: Clear(y) Holding(x,z) effects: +On(x,y) +Handempty(z) -Holding(x,z) -Clear(y) All preconditions satisfied, can be used The upper two lines are incomplete, preconditions need to be satisfied for Pickup and Putdown
13
Final plan:
14
Typical Errors In general this was well understood Some students used a plan that was not very efficient
15
Values of Information Most important is the information about the bus. In order to save the hotel you have to be at C at 6pm on a day where the bus is going. If you know at which days the bus is going you can save in the worst case 6 overnight stays, i.e. 180$. Train from B to C: If the train goes at 1pm then you will always catch a bus at 6pm but if the train goes at 7.30 you will miss such a bus. Therefore with this information you may save one overnight stay if you take the earlier flight, ie. you save 10 $. The direct flight is most expensive. Optimal plan: Phone about the bus schedule and phone about the train. Take, if possible, the morning flight from A to B and then train and bus or fly in the afternoon one day earlier.
16
Typical Errors Some students did not mention the actions thar get information. It also occurred that the single flight was con sidered as optimal.
17
Fuzzy Sets and Control A fuzzy membership function maps the elements of a universe U to the unit interval: µ : U [0,1] Linguistic variables and rules a expressions in natural language. A linguistic variable refers to a property and a liguistic rule refers to a rule. Both are interpreted in terms of membership functions and manipulations of membership functions.
18
Fuzzy Control Imagine we have a fuzzy system to control the setting of a valve according to specific temperatures. The two fuzzy control rules are: –Rule 2: IF temperature = medium THEN cooling valve = almost open. –Rule 1: IF temperature = low THEN cooling valve = half open. Suggest and explain membership functions to implement these rules and draw them into the following diagrams.
19
(T) T [ o C] 1530 0.5 1 (v) v [%] 50100 0.5 1 Rule 1: (T) T [ o C] 1530 0.5 1 (v) v [%] 50100 0.5 1 Rule 2: IF temperature = low THEN cooling valve = half open. IF temperature = medium THEN cooling valve = almost open.
20
(T) T [ o C] 1530 0.5 1 (v) v [%] 50100 0.5 1 Rule 1: (T) T [ o C] 1530 0.5 1 (v) v [%] 50100 0.5 1 Rule 2: IF temperature = low THEN cooling valve = half open. IF temperature = medium THEN cooling valve = almost open.
21
0.5 1 50% 100%
22
Typical Errors One error type was that some students did not care about the membership functions.E.g. “Low temperature” membership goes down if the temperature increases.
23
Summary In principle, there was no serious misunderstanding. There errors were about equally distributed over the questions. They were most of time due to a lack of preciseness.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.