# XF2 Exam Part 2 Version B

📗 Enter your ID (the wisc email ID without @wisc.edu) here: and click (or hit the "Enter" key)  

📗 You can also load from your saved file
and click .
📗 If the questions are not generated correctly, try refresh the page using the button at the top left corner.
📗 The same ID should generate the same set of questions. Your answers are not saved when you close the browser. You could print the page: , solve the problems, then enter all your answers at the end. 
📗 Please do not refresh the page: your answers will not be saved.
📗 Please join Zoom for announcements: Link.

# Warning: please enter your ID before you start!


# Question 1



# Question 2



# Question 3



# Question 4



# Question 5



# Question 6



# Question 7



# Question 8



# Question 9



# Question 10



# Question 11



# Question 12



# Question 13



# Question 14



# Question 15



📗 [3 points] Suppose the initial state is \(S\) and goal state is \(G\). What is the smallest value of the heuristic at state \(1\) such that when A search (A* without the star) is used on the following graph and it does not find the optimal solution. In case of tie, expand the state with a smaller index (i.e. \(1\) before \(2\)).
📗 In case the diagram is not clear, the edge costs are

📗 Answer: .
📗 [3 points] Given the following function, if hill climbing with a (uniform) random initial state is used once (i.e. without restart) to find the maximum score, what is the probability that it finds the global maximum? In case of ties, assume hill climbing move towards the global maximum.
State \(s_{1}\) \(s_{2}\) \(s_{3}\) \(s_{4}\) \(s_{5}\)
Score

📗 Answer: .
📗 [4 points] What is the value of the solution of the following game (two values one for player 1 one of player 2)? In case of tie, the players will choose down (D).
📗 Note: in case the diagram is not clear: two players take turn and choose either to go right or go down, the payoffs from going down in periods \(1, 2, 3, 4\) are , , , , respectively, and the payoff from going right 4 times is .

📗 Answer (comma separated vector): .
📗 [3 points] The following BoS (Battle of the Sexes) game has a Nash equilibrium where the row player uses \(B\) with probability and the column player uses \(B\) with probability . What are the values \(\left(x, y\right)\)? If there are multiple possible values, enter one of them, if there are none, enter \(-1\).
Actions B S
B \(\left(x, y\right)\) \(\left(0, 0\right)\)
S \(\left(0, 0\right)\)

📗 Answer: .
📗 [2 points] Suppose scaled dot-product attention function is used. Given two vectors \(q\) = , \(k\) = , calculate the attention score of \(q\) to \(k\).
📗 Answer: .
📗 [3 points] Assume tokenization rule is using whitespaces between words as separator, input one sentence \(s_{1}\) into decoder stack during training time. Write down the attention mask of self-attention block in decoder, where \(1\) = attented, \(0\) = masked.
Sentence: \(s_{1}\) = "". (Note: "< s >" is one token, not three).
📗 Answer (matrix with multiple lines, each line is a comma separated vector):
📗 [4 points] Given there are states in a search tree with levels (max depth, the root is at depth 0 or level 0 but counts as one level) and no goal states, what is the imum possible number of states expanded during an IDS (Iterative Deepening Search)? The same state may be expanded multiple times during different iterations (with different depth limits) of the search.
📗 Note: the number of levels is fixed in this question, a tree with more or fewer levels is not valid. The answer obtained from not counting the root as one of the levels will be accepted too.
📗 Answer: .
📗 [4 points] There are 3 states \(s_{0}, s_{1}, s_{2}\) and 3 actions \(a_{0}, a_{1}, a_{2}\). We start from , choose , we get the reward and then move to , choose . Update the Q value for (, ) based on the current Q table and the movement above, using SARSA and Q-learning (enter two numbers, comma separated)? The reward decay (discount rate) is \(\gamma\) = , and the step size (learning rate) is \(\alpha\) = .
State \ Action \(a_{0}\) \(a_{1}\) \(a_{2}\)
\(s_{0}\)
\(s_{1}\)
\(s_{2}\)

📗 Answer (comma separated vector): .
📗 [4 points] Let the states be 3D integer points with integer coordinates \(\left(i, j, k\right)\) with boundary constrains and and . Each state \(\left(i, j, k\right)\) has six successors \(\left(i - 1, j, k\right), \left(i + 1, j, k\right), \left(i, j - 1, k\right), \left(i, j + 1, k\right), \left(i, j, k - 1\right), \left(i, j, k + 1\right)\) or a subset thereof subject to the boundary constraints. The score of state \(\left(i, j, k\right)\) is . Which local minimum will be reached if hill climbing is used starting from ? Enter the state, not the score.
📗 Answer (comma separated vector): .
📗 [3 points] If \(h_{1}\) and \(h_{2}\) are both admissible heuristic functions, which ones of following are also admissible heuristic functions? Enter the correct choices as a list, comma separated, without parentheses, for example, "1, 2, 4".
📗 Choices:
(1)
(2)
(3)
(4)
(5)
(6)
(7) None of the above
📗 Answer (comma separated vector): .
📗 [4 points] For a zero-sum game in which moves first and if the action Left is chosen, then Chance (Chn) moves Left with probability \(p\) and Right with probability \(1 - p\), and if the action Right is chosen, then Chance moves Left with probability and Right with probability . Suppose the player who moves first uses a mixed strategy \(\dfrac{1}{2}\) Left and \(\dfrac{1}{2}\) Right in a solution, what is the value of \(p\)? If it's impossible, enter \(-1\).
📗 Note: in case the diagram is not clear, the values on the leafs (each sub-branch is a row): .

📗 Answer: .
📗 [3 points] Consider the standard PD (Prisoner's Dilemma) game in the following table with two prisoners that belong to the same criminal organization, and the criminal organization punishes whoever confesses which decrease the prisoner's value by \(x\). What is the smallest value of \(x\) so that (deny, deny) is a Nash equilibrium?
A \ B Deny Confess
Deny
Confess

📗 Answer: .
📗 [3 points] Find the value of the mixed strategy Nash equilibrium of the following zero-sum game.
MAX \ MIN A B
A
B

📗 Answer: .
📗 [4 points] You will receive 4 points for this question and you can choose to donate x points (a number between 0 and 4). Your final grade for this question is the points you keep plus twice the average donation (sum of the donations from everyone in your section divided by the number of people in your section, combining both versions). Enter the points you want to donate (an integer between 0 and 4).
📗 Answer: (The grade for this question will be updated later).
📗 [1 points] Please enter any comments including possible mistakes and bugs with the questions or your answers. If you have no comments, please enter "None": do not leave it blank.
📗 Answer: .

# Grade


 ***** ***** ***** ***** ***** 

 ***** ***** ***** ***** *****

# Submission


📗 Please do not modify the content in the above text field: use the "Grade" button to update.


📗 Please wait for the message "Successful submission." to appear after the "Submit" button. If there is an error message or no message appears after 10 seconds, please save the text in the above text box to a file using the button or copy and paste it into a file yourself and submit it to Canvas Assignment FX2. You could submit multiple times (but please do not submit too often): only the latest submission will be counted.
📗 You could load your answers from the text (or txt file) in the text box below using the button . The first two lines should be "##x: 8" and "##id: your id", and the format of the remaining lines should be "##1: your answer to question 1" newline "##2: your answer to question 2", etc. Please make sure that your answers are loaded correctly before submitting them.








Last Updated: April 29, 2024 at 1:11 AM