[题集]Lecture 6. Backtracking

1.It is guaranteed that an exhaustive search can always find the solution in finite time.

F

就是遍历整个树的搜索。我猜可能是不一定能找到solution

2.In the 4-queens problem, (x1, x2, x3, x4) correspond to the 4 queens’ column indices. During backtracking, (1, 3, 4, ?) will be checked before (1, 4, 2, ?), and none of them has any solution in their branches.

首先检查1,3,4,发现不满足。然后检查1,4,开头的1,2,3,4,5,6…。首先从第一行往下检查,从左往右遍历。如果不满足,不进行下一行的检查。
T

3.In a Turnpike Reconstruction Problem, given distance set D = { 2, 2, 4, 4, 6, 8 }, x1~x4 = ( 0, 2, 4, 8 ) is the only solution provided that x1 = 0.

0,4,6,8也是可以的。按照那个算法:首先x4=8

然后找出D最大的为6,尝试x3=6,发现8-6在D中。将2从D中删除

然后找D最大的为4,尝试x2=4,发现8-4=4,6-4=2在D中,将2,4删除。

最后D为空,说明解决问题。

4.Given the following game tree, the red node will be pruned with α-β pruning algorithm if and only if __.

在这里插入图片描述
A.6≤x≤13

B.x≥13

C.6≤x≤9

D.x≥9

剪枝发生的情况:其兄弟节点比它的节点更优。它的另外一个子节点被剪枝。

此时,min选择了9,则为了比9更优,x必须大于9,才能使得中间一个节点无论如何大于9,则Max不会选择最右边节点。D

5.In the Tic-tac-toe game, a “goodness” function of a position is defined as f§=Wcomputer−Whuman.where W is the number of potential wins at position P. In the following figure, O represents the computer and X the human. What is the goodness of the position of the figure?

在这里插入图片描述

A.-1

B.0

C.4

D.5

1种方法是,把空的都填上,看有几种赢法。

对人来说:

XOX
XXX
OXX
赢法有3种。

对于电脑来说

OOO
OXX
OOO
赢法有3种

所以是0,妈的改题目了

在这里插入图片描述
这个是3-4=-1

6. Given the following game tree, which node is the first one to be pruned with α-β pruning algorithm?

在这里插入图片描述

剪枝的情况是:由于不会选它的父亲了,因此它被剪枝了。

根据深度优先搜索,必须先遍历左孩子,才是根,才是右孩子,只可能是右孩子被剪枝,因此是C

7.Given the distance set D={1,1,2,2,2,2,3,3,3,4,5,5,6,6,8} in a Turnpike Reconstruction problem, first it can be sure that x1=0 and x6=8. Which of the following possible solutions will be checked next?

A.x2=1, x5=6

B.x2=2, x5=6

C.x3=3, x5=6

D.x2=1, x5=5

距离端点一定是6,但是哪个端点是不知道的,因此是x5=6,或者x2=2.B

8.Given the following game tree, if node b is pruned with α-β pruning algorithm, which of the following statements about the value of node a is correct?

在这里插入图片描述
A.greater than 65

B.less than 65

C.greater than 68

D.less than 68

左边是68,说明父节点选了68,因此a比68大 C

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值