人工智能练习题

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Part I SEARCH

1 Search

You’re a taxi driver. Your taxi can hold 4 passengers. Passengers pay a flat fee for a ride to the airport, so goal is to pick up 4 passengers and take them to the airport in the smallest number of miles. Your world can be modeled as a graph of locations with distances between them. Some, but not all, of the locations have passengers that you can pick up.

a. Describe the state space of this search problem.

b. What would be a good cost function for this search problem?

c. Now, consider a case where passengers have to pay according to how far away they are from the airport when they’re picked up (note: they don’t pay according to how long a ride they take in your taxi, but according to the length of the shortest path from their pickup-point to the airport). Describe the state space of this search problem.

d. What would be a good cost function for this version of the problem? You still have a desire to save gas.

e. Is uniform cost search guaranteed to find the optimal solution in either or both versions of the problem? Why or why not?

a. Your current location and number of passengers in the car.

b. Distance traveled so far.

c. Current location, the number of passengers in the car, and the fares of the passengers you have in the car.

d. Some constant c1 times the distance traveled so far minus some other constant c2 times the fares of the passengers we’ve picked up so far.

e. UCS will work in the first case, because there are no negative costs, but it’s not guaranteed to find the shortest path in the second version of the problem.

2 Search

Consider the following graph, in which A is the start node and F is the goal node. Assume that nodes are visited at most once.

1. In what order does uniform-cost search visit the nodes?

2. Let the heuristic function h(n) be the minimum number of arcs between node n and the goal node. Is this an admissible heuristic? Why or Why not?

3. In what order does A* search visit the nodes? What are their estimated values when they are visited?

1. A B E C F

2. Yes, it is admissible because it is a conservative estimate of the distance.

3. A(2) B(4) E(4) F(5)

3 Search

Below is a graph to be searched (starting at S and ending at G). Link/edge costs are shown as well as heuristic estimates at the states. You may not need all the information for every search.

1.Draw the complete search tree for this graph. Label each node in the tree with the cost of the path to that node and the heuristic cost at that node.

相关文档
最新文档