Python与人工智能 - 中国大学mooc

已完结

 116

第1周

课后作业

1、Q4 Conditional Probabilities Select all of the following statements that are true for all joint distributions over XX and YY.

2、(续上题)

3、(续上题)

4、(续上题)

5、(续上题)

6、Q1 Probabilistic Inference Your box of cereal may be a contest winner! It's rattling, which 100% of winning boxes do. Of course 1% of all boxes rattle and only one box in a million is a winner. What is the probability that your box is a winner? Note on answer formatting: Please specify your answer as a decimal probability (i.e. .05 rather than 5%). Do not include zeros before the decimal. To receive credit, your answer must match ours exactly.

7、Q2 Events You are playing a solitaire game in which you are dealt three cards without replacement from a simplified deck of 10 cards (marked 1 through 10). You win if one of your cards is a 10 or if all of your cards are odd. How many winning hands are there if different orders are different hands?

8、(续上题) 216+60=276216+60=276 What is your chance of winning? (round your answer to 3 decimal places)

9、Q3 Expectations Someone rolls a fair six-sided die and you win points equal to the number shown. What is the expected number of points after one roll?

10、(续上题) After 2 rolls?

11、(续上题) After 100 rolls?

第2周

课后作业

1、Q7 HashingQ7.1 Which critical operation is generally faster in a hash table than in a linked list?

A、inserting an element into the data structure

B、testing for the membership of an element in the data structure

C、(无)

D、(无)

2、Q7.2 On average, how fast is this operation in a hash table?

A、

B、

C、

D、

3、Q7.3 On average, how fast is this operation in a linked list?

A、

B、

C、

D、

4、Q6 Logarithms Select all of the the following statements that are true.

5、(续上题)

6、(续上题)

7、(续上题)

8、(续上题)

9、(续上题)

10、Q5 Linear Equations You know that

and

What is x?

11、(续上题) What is y?

第3周

课后作业

1、Q6 Hive Minds: Lonely BugIntroduction The next five questions share a common setup. You control one or more insects in a rectangular maze-like environment with dimensions M MM times N NN , as shown in the figure below.

At each time step, an insect can either (a) move into an adjacent square if that square is currently free, or (b) stay in its current location. Squares may be blocked by walls, but the map is known. Optimality is always in terms of time steps; all actions have cost 1 regardless of the number of insects moving or where they move. For each of the five questions, you should answer for a general instance of the problem, not simply for the example maps shown. Problems For this problem, you control a single insect as shown in the maze above, which must reach a designated target location X, also known as the hive. There are no other insects moving around.Q6.1 Which of the following is a minimal correct state space representation?

A、An integer (d) encoding the Manhattan distance to the hive.

B、A tuple ((x, y)) encoding the (x) and (y) coordinates of the insect.

C、A tuple ((x, y, d)) encoding the insect's (x) and (y) coordinates as well as the Manhattan distance to the hive.

D、This cannot be represented as a search problem.

2、Q6.2 What is the size of the state space?

A、

B、

C、

D、

3、Q7 Hive Minds: Swarm Movement You control KKK insects, each of which has a specific target ending location

XkXk. No two insects may occupy the same square. In each time step all insects move simultaneously to a currently free square (or stay in place); adjacent insects cannot swap in a single time step.

A、

B、

C、

D、

4、Q7.2 What is the size of the above state space?

A、

B、

C、

D、

5、Q8 Hive Minds: Migrating Birds You again control a single insect, but there are BBB birds flying along known paths. Specifically, at time ttt each bird b bbwill be at position

(xb(t),yb(t))(xb(t),yb(t)). The tuple of bird positions repeats with period TTT. Birds might move up to 3 squares per time step. An example is shown below, but keep in mind that you should answer for a general instance of the problem, not simply the map and path shown below. Your insect can share squares with birds and it can even hitch a ride on them! On any time step that your insect shares a square with a bird, the insect may either move as normal or move directly to the bird’s next location (either action has cost 1, even if the bird travels farther than one square).

Q8.1 Which of the following is a minimal state representation?

A、

B、

C、

D、

6、Q8.2 Which of the following is the size of the state space?

A、

B、

C、

D、

7、Q8.3 Which of the following heuristics are admissible (if any)?

A、Cost of optimal path to target in the simpler problem that has no birds.

B、Manhattan distance from the insect's current position to the target.

C、Manhattan distance from the insect's current position to the nearest bird.

D、Manhattan distance from the insect's current position to the target divided by three.

8、Q6.3 Which of the following heuristics are admissible (if any)?

A、Manhattan distance from the insect’s location to the hive.

B、Euclidean distance from the insect’s location to the hive.

C、Number of steps taken by the insect.

D、(无)

9、Q7.3 Which of the following heuristics are admissible (if any)?

A、Sum of Manhattan distances from each insect's location to its target location.

B、Sum of costs of optimal paths for each insect to its goal if it were acting alone in the environment, unobstructed by the other insects.

C、Max of Manhattan distances from each insect's location to its target location.

D、Max of costs of optimal paths for each insect to its goal if it were acting alone in the environment, unobstructed by the other insects.

10、Q1 Search Trees How many nodes are in the complete search tree for the given state space graph? The start state is S. You may find it helpful to draw out the search tree on a piece of paper.

11、Q2 Depth-First Graph Search Consider a depth-first graph search on the graph below, where S is the start and G is the goal state. Assume that ties are broken alphabetically (so a partial plan S->X->A would be expanded before S->X->B and S->A->Z would be expanded before S->B->A). You may find it helpful to execute the search on scratch paper. Please enter the final path returned by depth-first graph search in the box below. Your answer should be a string with S as your first character and G as your last character. Don't include arrows or spaces in your submission. For example, if you believe the path is S->X->G, please enter SXG in the box.

12、Q3 Breadth-First Graph Search Consider a breadth-first graph search on the graph below, where S is the start and G is the goal state. Assume that ties are broken alphabetically (so a partial plan S->X->A would be expanded before S->X->B and S->A->Z would be expanded before S->B->A). You may find it helpful to execute the search on scratch paper. Please enter the final path returned by breadth-first graph search in the box below. Your answer should be a string with S as your first character and G as your last character. Don't include arrows or spaces in your submission. For example, if you believe the path is S->X->G, please enter SXG in the box.

第4周

课后作业

1、Q4 A* Graph Search Consider A* graph search on the graph below. Arcs are labeled with action costs and states are labeled with heuristic values. Assume that ties are broken alphabetically (so a partial plan S->X->A would be expanded before S->X->B and S->A->Z would be expanded before S->B->A.

Q4.1 In what order are states expanded by A* graph search? You may find it helpful to execute the search on scratch paper.

A、Start, A, B, C, D, Goal

B、Start, A, C, Goal

C、Start, B, A, D, C, Goal

D、Start, A, D, Goal

2、Q4.2 What path does A* graph search return?

A、Start-A-C-Goal

B、Start-B-Goal

C、Start-A-D-Goal

D、Start-A-B-Goal

3、Q5 Uniform-Cost Graph Search Consider the graph below. Arcs are labeled with their weights. Assume that ties are broken alphabetically (so a partial plan S->X->A would be expanded before S->X->B and S->A->Z would be expanded before S->B->A.

Q5.1 In what order are states expanded by Uniform Cost Search? You may find it helpful to execute the search on scratch paper.

A、Start, A, B, C, D, Goal

B、Start, A, C, Goal

C、Start, B, A, D, C, Goal

D、Start, A, D, Goal

4、Q5.2 What path does uniform cost search return?

A、Start-A-C-Goal

B、Start-B-Goal

C、Start-A-D-Goal

D、Start-A-B-Goal

5、Q9 Hive Minds: Jumping Bug Your single insect is alone in the maze again. This time, it has super legs that can take it as far as you want in a straight line in each time step. The disadvantage of these legs is that they make turning slower, so now it takes the insect a time step to change the direction it is facing. Moving vv squares v requires that all intermediate squares passed through, as well as the vvvth square, currently be empty. The cost of a multi-square move is still 1 time unit, as is a turning move. As an example, the arrows in the maze below indicate where the insect will be and which direction it is facing after each time step in the optimal (fewest time steps) plan (cost 5):

Q9.1 Which of the following is a minimal state representation?

A、A tuple (x,y) giving the position of the insect.

B、A tuple (x,y) giving the position of the insect, plus the direction the insect is facing.

C、A tuple (x,y) giving the position of the insect, plus an integer representing the number of direction changes necessary on the optimal path from the insect to the goal.

D、A tuple (x,y) giving the position of the insect, plus an integer t representing the number of time steps that have passed.

6、Q9.2 What is the size of the state space?

A、

B、

C、

D、

7、Q10 Hive Minds: Lost at Night It is night and you control a single insect. You know the maze, but you do not know what square the insect will start in. You must pose a search problem whose solution is an all-purpose sequence of actions such that, after executing those actions, the insect is guaranteed to be on the exit square, regardless of initial position. The insect executes the actions mindlessly and does not know whether its moves succeed: if it uses an action which would move it in a blocked direction, it will stay where it is. For example, in the maze below, moving right twice guarantees that the insect will be at the exit regardless of its starting position.

Q10.1 Which of the following state representations could be used to solve this problem?

A、A tuple (x,y) representing the position of the insect.

B、A tuple (x,y) representing the position of the insect, plus a list of all squares visited by the insect.

C、An integer t representing how many time steps have passed, plus an integer b representing how many times the insect's motion has been blocked by a wall.

D、A list of boolean variables, one for each position in the maze, indicating whether the insect could be in that position.

8、Q10.2 What is the size of the state space?

A、

B、

C、

D、

9、Q10.3 Which of the following are admissible heuristics?

A、Total number of possible locations the insect might be in.

B、The maximum of Manhattan distances to the exit square from each possible location the insect could be in.

C、The minimum of Manhattan distances to the exit square from each possible location the insect could be in.

D、(无)

10、Q11 Hive Minds: Time Limit In this problem, the ladybug has a limited number of timesteps remaining. For each timestep, there is no moving penalty, but the remaining time will decrease by one. The ladybug will gain or lose points when it lands on positive or negative values, respectively. The ladybug must move to a new square for each timestamp, and the ladybug cannot move to a square that it has already visited. Your goal in this problem is to find the optimal score (higher is better) for a given timestep limit.

Q11.1 What is the optimal score for a timestep of 2?:

11、(续上题)Q11.2 What is the optimal score for a timestep of 5?:

12、(续上题)Q11.3 What is the optimal score for a timestep of 8?:

13、Q11.4 What is the optimal score for a timestep of 11?:

第5周

课后作业

1、Q12 Early Goal Checking Graph Search Recall from lecture the general algorithm for GRAPH-SEARCH reproduced below.

With the above implementation a node that reaches a goal state may sit on the fringe while the algorithm continues to search for a path that reaches a goal state. Let's consider altering the algorithm by testing whether a node reaches a goal state when inserting into the fringe. Concretely, we add the line of code highlighted below:

Now, we've produced a graph search algorithm that can find a solution faster. However, In doing so we might have affected some properties of the algorithm. To explore the possible differences, consider the example graph below.

Q12.1 If using EARLY-GOAL-CHECKING-GRAPH-SEARCH with a Uniform Cost node expansion strategy, which path, if any, will the algorithm return?

A、S-G

B、S-A-G

C、EARLY-GOAL-CHECKING-GRAPH-SEARCH will not find a solution path.

D、(无)

2、Q12.2 If using EARLY-GOAL-CHECKING-GRAPH-SEARCH with an A* node expansion strategy, which path, if any, will the algorithm return?

A、S-G

B、S-A-G

C、EARLY-GOAL-CHECKING-GRAPH-SEARCH will not find a solution path.

D、(无)

3、Q13 Lookahead Graph Search Recall from lecture the general algorithm for Graph Search reproduced below.

Using GRAPH-SEARCH, when a node is expanded it is added to the closed set. This means that even if a node is added to the fringe multiple times it will not be expanded more than once. Consider an alternative version of GRAPH-SEARCH, LOOKAHEAD-GRAPH-SEARCH, which saves memory by using a "fringe-closed-set" keeping track of which states have been on the fringe and only adding a child node to the fringe if the state of that child node has not been added to it at some point. Concretely, we replace the highlighted block above with the highlighted block below.

Now, we've produced a more memory efficient graph search algorithm. However, in doing so, we might have affected some properties of the algorithm. To explore the possible differences, consider the example graph below.

Q13.1 If using LOOKAHEAD-GRAPH-SEARCH with an A* node expansion strategy, which path will this algorithm return? (We strongly encourage you to step through the execution of the algorithm on a scratch sheet of paper and keep track of the fringe and the search tree as nodes get added to the fringe.)

A、S→A→D→G

B、S→B→G

C、S→A→C→G

D、S→B→D→G

4、Q12.3 Assume you run EARLY-GOAL-CHECKING-GRAPH-SEARCH with the Uniform Cost node expansion strategy, select all statements that are true.

A、The EXPAND function can be called at most once for each state.

B、The algorithm is complete.

C、The algorithm will return an optimal solution.

D、(无)

5、Q12.4 Assume you run EARLY-GOAL-CHECKING-GRAPH-SEARCH with the A* node expansion strategy and a consistent heuristic, select all statements that are true.

A、The EXPAND function can be called at most once for each state.

B、The algorithm is complete.

C、The algorithm will return an optimal solution.

D、(无)

6、Q13.2 Assume you run LOOKAHEAD-GRAPH-SEARCH with the A* node expansion strategy and a consistent heuristic, select all statements that are true.

A、The EXPAND function can be called at most once for each state.

B、The algorithm is complete.

C、The algorithm will return an optimal solution.

D、(无)

7、Q14 Memory Efficient Graph Search 7 Points Recall from lecture the general algorithm for GRAPH-SEARCH reproduced below.

Using GRAPH-SEARCH, when a node is expanded it is added to the closed set. This means that even if a node is added to the fringe multiple times it will not be expanded more than once. Consider an alternate version of GRAPH-SEARCH, MEMORY-EFFICIENT-GRAPH-SEARCH, which saves memory by (a) not adding node n nn to the fringe if STATE[nnn] is in the closed set, and (b) checking if there is already a node in the fringe with last state equal to STATE[nnn]. If so, rather than simply inserting, it checks whether the old node or the new node has the cheaper path and then accordingly leaves the fringe unchanged or replaces the old node by the new node. By doing this the fringe needs less memory, however insertion becomes more computationally expensive. More concretely, MEMORY-EFFICIENT-GRAPH-SEARCH is shown below with the changes highlighted.

Now, we've produced a more memory efficient graph search algorithm. However, in doing so, we might have affected some properties of the algorithm. Assume you run MEMORY-EFFICIENT-GRAPH-SEARCH with the A* node expansion strategy and a consistent heuristic, select all statements that are true.

A、The EXPAND function can be called at most once for each state.

B、The algorithm is complete.

C、The algorithm will return an optimal solution.

D、(无)

第6周

课后作业

1、(续上题) Select the boxes for leaf values that don't get visited due to pruning

A、5

B、6

C、2

D、1

2、Q1 Minimax Consider the zero-sum game tree shown below. Triangles that point up, such as at the top node (root), represent choices for the maximizing player; triangles that point down represent choices for the minimizing player. Outcome values for the maximizing player are listed for each leaf node, represented by the values in squares at the bottom of the tree. Assuming both players act optimally, carry out the minimax search algorithm. Enter the values for the letter nodes in the boxes below the tree.

Input Answers Here A:

3、(续上题) B:

4、(续上题) C:

5、(续上题) D:

6、Q4 Alpha-Beta Pruning Consider the game tree shown below. Triangles that point up, such as at the top node (root), represent choices for the maximizing player; triangles that point down represent choices for the minimizing player. Assuming both players act optimally, use alpha-beta pruning to find the value of the root node. The search goes from left to right; when choosing which child to visit first, choose the left-most unvisited child. In the first set of boxes below, enter the values of the labeled nodes. Then, select the leaf nodes that don't get visited due to pruning. Hint: Note that the value of a node where pruning occurs is not necessarily the maximum or minimum (depending on which node) of its children. When you prune on conditions V>βV>βV>β or V<αV<αV<α, assume that the value of the node is VVV.

Enter the values of the labeled nodes A:

7、(续上题) B:

8、(续上题) C:

9、(续上题) D:

第7周

课后作业

1、Q2 Expectiminimax Consider the game tree shown below. As in the previous problem, triangles that point up, such as the top node (root), represent choices for the maximizing player; triangles that point down represent choices for the minimizing player. The circular nodes represent chance nodes in which each of the possible actions may be taken with equal probability. The square nodes at the bottom represent leaf nodes. Assuming both players act optimally, carry out the expectiminimax search algorithm. Enter the values for the letter nodes in the boxes below the tree.

Input Answers Here A:

2、(续上题) B:

3、(续上题) C:

4、(续上题) D:

5、(续上题) E:

6、(续上题) F:

7、(续上题) G:

期末考试

期末考试

1、Consider A* graph search on the graph below. Arcs are labeled with action costs and states are labeled with heuristic values. Assume that ties are broken alphabetically (so a partial plan S->X->A would be expanded before S->X->B and S->A->Z would be expanded before S->B->A.

In what order are states expanded by A* graph search? You may find it helpful to execute the search on scratch paper.

A、Start, A, B, C, D, Goal

B、Start, A, C, Goal

C、Start, B, A, D, C, Goal

D、Start, A, D, Goal

2、(续上题) What path does A* graph search return?

A、Start-A-C-Goal

B、Start-A-D-Goal

C、Start-A-B-Goal

D、Start-A-B-D-Goal

3、Assume you are given a CSP and you enforce arc consistency. Which of the following are true?

A、If the CSP has no solution, it is guaranteed that enforcement of arc consistency resulted in at least one domain being empty.

B、If the CSP has a solution, then after enforcing arc consistency, you can directly read off the solution from resulting domains.

C、In general, to determine whether the CSP has a solution, enforcing arc consistency alone is not sufficient; backtracking may be required.

D、None of the above.

4、Which of the following statements are true for an MDP?

A、If the only difference between two MDPs is the value of the discount factor then they must have the same optimal policy.

B、For an infinite horizon MDP with a finite number of states and actions and with a discount factor γ that satisfies 0<γ<1, value iteration is guaranteed to converge.

C、When running value iteration, if the policy (the greedy policy with respect to the values) has converged, the values must have converged as well.

D、None of the above

5、In general, for Q-Learning to converge to the optimal Q-values...

A、It is necessary that every state-action pair is visited infinitely often.

B、It is necessary that the learning rate α (weight given to new samples) is decreased to 0 over time.

C、It is necessary that the discount γ is less than 0.5.

D、It is necessary that actions get chosen according to

.

6、Consider the value of perfect information (VPI) of observing some node in an arbitrary decision network. Which of the following are true statements?

A、VPI is guaranteed to be positive (>0).

B、VPI is guaranteed to be nonnegative (≥0).

C、VPI is guaranteed to be nonzero.

D、The MEU after observing a node could potentially be less than the MEU before observing that node.

7、Consider the following particle filter implementations.

For each of the following statements about the two implementations, select whether they are true or false. The default implementation will typically provide a better estimate of the distribution than the alternate implementation.

8、(续上题) If the observation model is deterministic then the default implementation will typically provide a better estimate of the distribution than the alternate implementation.

9、(续上题) If the transition model is deterministic then the default implementation will typically provide a better estimate of the distribution than the alternate implementation.

10、Someone rolls a fair six-sided die and you win points equal to the number shown. What is the expected number of points after one roll?

11、(续上题) After 2 rolls?

12、(续上题) After 100 rolls?

13、Consider the game tree shown below. As in the previous problem, triangles that point up, such as the top node (root), represent choices for the maximizing player; triangles that point down represent choices for the minimizing player. The circular nodes represent chance nodes in which each of the possibl

python好学吗mooc中文网-Python与人工智能-中国大学mooc-题库零氪相关推荐

  1. python能在哪些系统上运行_中国大学MOOC:Python语言可以在哪些操作系统下运行______。...

    中国大学MOOC:Python语言可以在哪些操作系统下运行______. 正常人一出生其颈部有()条横向皱纹,属于正常生理现象.A:1--3B:5--6C:4--5D:3--4 在Al海区实现船对岸遇 ...

  2. mooc上python课程哪个好_如何爬取中国大学MOOC上的课程信息

    因为最近需要做一个关于课程类的项目,但苦于没有相关课程的信息及简介.当我在看MOOC上面的Python爬虫课程时,突然想到MOOC上面的课程信息如此完善,我为何不利用下MOOC上面的课程信息呢,说干就 ...

  3. python预测新航线的票价_2020年中国大学MOOC的APP用Python玩转数据章节测验答案

    哥伦布最初想要寻找的是什么? 哥伦布发现新大陆是以下哪一年?() 哥伦布并不是第一个到达美洲的人. 哑铃俯身臂屈伸练习中,练习者自然站立,膝盖微屈后,俯身至身体与地面基本平行,核心收紧.双手对握哑铃, ...

  4. 人工智能和python毕业设计题目_Python与人工智能-中国大学mooc-题库零氪

    Python与人工智能 - 中国大学mooc 已完结  451 第1周 课后作业 1.Q4 Conditional Probabilities Select all of the following ...

  5. python金融分析试题及答案_Python在金融中的应用-曾凡-中国大学mooc-试题题目及答案...

    Python在金融中的应用-曾凡-中国大学mooc-试题题目及答案 更多相关问题 [填空题]根据发生时间的早晚及是否具有特异性,免疫应答可分为 [单选题]1041.二元溶液连续精馏计算中,物料的进料状 ...

  6. linux 文件在哪个硬盘,中国大学MOOC: 在Linux文件系统中,文件名也存放在磁盘上,存放于磁盘的下述哪个区域 答案:文件存储区...

    相关问题 中国大学MOOC:"唐蕃会盟碑又称为甥舅会盟碑,对吗?"; 中国大学MOOC:"If students plan to study in a second la ...

  7. python 慕课网请编写一个fib函数_中国大学MOOC(慕课)Python编程基础章节测试答案...

    中国大学MOOC(慕课)Python编程基础章节测试答案 更多相关问题 放射免疫分析法中,下列有关准确度的描述正确的是A.测得最少量的物质浓度B.重现性C.检测到单一物 社会鼎盛是唐代()的主要原因. ...

  8. 中国大学MOOC“Python程序设计基础”第6次开课时间

    推荐图书: <Python程序设计基础(第2版)>,ISBN:9787302490562,董付国,清华大学出版社,第20次印刷,清华大学出版社2019.2020.2021年度畅销图书,山东 ...

  9. 中国大学MOOC“Python程序设计基础”第4次开课

    推荐图书: <Python程序设计基础(第2版)>,ISBN:9787302490562,董付国,清华大学出版社,第19次印刷,清华大学出版社2019.2020年度畅销图书,山东省高等教育 ...

最新文章

  1. LeetCode简单题之移动零
  2. Taints和Tolerations
  3. sql语句如何执行的
  4. 【C++】error C2512: 'Adder' : no appropriate default constructor available
  5. [Python图像处理] 十三.基于灰度三维图的图像顶帽运算和黑帽运算
  6. 怎么彻底删除oracle
  7. 你确定你会使用git commit?
  8. 关于使用jquery修改hover伪标签的样式
  9. Elasticsearch——filter过滤查询
  10. oracle视图查询机制,物化视图及日志内部机制的一点研究
  11. 欠薪的公司,不要做任何犹豫!
  12. 机器学习课程笔记【五】- 支持向量机(1)
  13. Hibernate的使用
  14. 实力验证:金蝶EAS 8.2授权注册 (包含Apusic 9999连接数破解)
  15. 服务器运行速度测试方法,服务器如何测试运行速度
  16. java项目学生量化管理考核细则_班级管理量化考核细则范本
  17. Android 激活设备管理器后就无法再次打开设备管理器界面
  18. 英伟达 Jetson Nano 新手必备:使用CSI或USB摄像头拍摄第一张照片
  19. python爬虫百度地图_零基础掌握百度地图兴趣点获取POI爬虫(python语言爬取)(基础篇)...
  20. XTDorne平台搭建无人机仿真环境时遇到的问题及解决

热门文章

  1. 利用URL查看网页源代码
  2. 管道程序c语言,怎么创建管道
  3. 关于stc,stm32,gd32单片机 isp 通过CAT1 ota升级的说明
  4. [附源码]Java计算机毕业设计SSM办公用品管理系统
  5. CSS-Less简介
  6. 微信小程序 JS中遍历后台获取的data数据并赋值
  7. c++数独游戏3.1
  8. 婚姻就是找个合适的人过日子
  9. golang单元测试:testing包的基本使用
  10. Ubuntu18.04 安装 Idea 2018.2 Ultimate