Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 460 Midterm solutions. 1.b 2.PEAS : Performance Measure, Environment, Actuators, Sensors 3.c 4.a. Environment: non-English language Internet sites.

Similar presentations


Presentation on theme: "CS 460 Midterm solutions. 1.b 2.PEAS : Performance Measure, Environment, Actuators, Sensors 3.c 4.a. Environment: non-English language Internet sites."— Presentation transcript:

1 CS 460 Midterm solutions

2 1.b 2.PEAS : Performance Measure, Environment, Actuators, Sensors 3.c 4.a. Environment: non-English language Internet sites that contain stories b. The environment is strictly dynamic (new stories are being added and removed all the time) but can be approximated as static for ease of search and selection. c. The environment is strictly stochastic (because it is dynamic, also because a practical implementation might only choose stories at random from the huge number returned by a search), but can be treated as approximately deterministic for the purposes of implementation. d. 1. number of search results returned for a query, 2. size of a site’s content 3. header or other info on the page indicating that it doesn’t already have an English translation. e. w1 * projected revenue - w2 * cost of translation – w3 * risk of getting caught

3 5. a. State space: where contents1 <= 12, contents2 <= 8, and contents3 <= 3 b. initial state: c. path cost function: Moves  1 ( any move has uniform cost of 1, path cost function is the same as path length) d. goal state: { or, or } e. informed search that takes advantage of the fact that you should start with the 3 gallon & 8 gallon jugs and don’t need the 12 gallon jug.

4 6. These are general factors that will apply to problem 5 as well as all others: 1. completeness, 2. time complexity, 3. space complexity, 4. optimality 7. Completeness: A strategy is said to be complete if it is guaranteed to find a solution if a solution exists. optimality: A strategy is said to be optimal if it is guaranteed to find an optimal (best as measured by the performance measure) solution, if a solution exists.

5 8. It is clear that we need some sort of heuristic to get to the easy answer in minimum no. of steps. (0,0,0)  (0,0,3)  (0,3,0)  (0,3,3)  (0,6,0)  (0,6,3)  (0,8,1). Without the heuristic, we could waste a lot of steps. The best thing to try would be A* search, one possible heuristic might be: “fill an odd number (giving a remainder of 1) of gallons from the faucet” 9.

6 9 a.

7 9 b. I. BFS: 1 2 3 4 5 6 7 8 9 10 11 II. Depth limited with limit 3: 1 2 4 8 9 5 10 11 III. Iterative deepening: 1; 1 2 3 ; 1 2 4 5 3 6 7 ; 1 2 4 8 9 5 10 11 10. d 11. a. b. <= 4 **4 = 256 c. the tree is only 1 level deep, and we can do it with 256 bytes. 12.a. max score is 4 b. assuming we traverse the leaves from left to right, we can prune the node with value 6.


Download ppt "CS 460 Midterm solutions. 1.b 2.PEAS : Performance Measure, Environment, Actuators, Sensors 3.c 4.a. Environment: non-English language Internet sites."

Similar presentations


Ads by Google