# XF1 Exam Part 1 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] Given the variance matrix of a data set \(V\) = , a principal component \(u\) = , what is the projected variance of the data set in the direction \(u\)?
📗 Answer: .
📗 [3 points] Suppose the UCB1 (Upper Confidence Bound) Algorithm is used to select arms in a multi-armed bandit problem, and in round \(t\) = , the arms pulls and empirical means \(\hat{\mu}\) for the arms are summarized in the following table, and in period \(t + 1\), an arm is pulled according to the UCB1 Algorithm and the reward is . Compute the updated empirical means of the arms after period \(t + 1\), i.e. updated \(\hat{\mu}_{1}, \hat{\mu}_{2}, ...\). Use \(c\) = .
Arms arm pulls (\(n_{k}\)) empirical means \(\hat{\mu}_{k}\) upper confidence bounds \(\hat{\mu}_{k} + c \sqrt{2 \dfrac{\log t}{n_{k}}}\)
\(k = 1\)
\(k = 2\)
\(k = 3\)

📗 Answer (comma separated vector): .
📗 [3 points] In an infinite horizon MDP (Markov Decision Process), there are \(n\) = states: initial state \(s_{0}\), and absorbing states \(s_{1}, s_{2}, ..., s_{n-1}\). In state \(s_{0}\), the agent can stay or move to any other state, but in all other absorbing states the agent can only choose to stay. The reward from staying in those states are summarized in the following table. Compute the Q value (under the optimal policy, not from Q learning) \(Q\left(s_{0}, \text{stay}\right)\). Use the discount factor \(\gamma\) = .
State \(s_{0}\) \(s_{1}\) \(s_{2}\) \(s_{3}\) \(s_{4}\)
Reward from stay
Reward from move - - - -

📗 Answer: .
📗 [3 points] Consider a vector \(x\) = , if the principal component is = , what is the reconstruction of \(x\) using only the first principal components?
📗 Answer (comma separated vector): .
📗 [2 points] Given attention weight from \(q\) to \(k_{1}\), \(w_{1}\) = , from \(q\) to \(k_{2}\), \(w_{2}\) = , given values \(v_{1}\) = , \(v_{2}\) = , calculate the output vector.
📗 Answer (comma separated vector): .
📗 [3 points] Given the pairwise distance matrix \(d\), what is the linkage distance between the cluster {} and {}? The columns and rows are indexed \(1, 2, 3, ...\), i.e. row \(i\) column \(j\) is the distance between point \(i\) and point \(j\).
d =
📗 Answer: .
📗 [4 points] When using the Genetic Algorithm, suppose the states are \(\begin{bmatrix} x_{1} & x_{2} & ... & x_{T} \end{bmatrix}\) = , , , . Let \(T\) = , the fitness function (not the cost) is \(\mathop{\mathrm{argmax}}_{t \in \left\{0, ..., T\right\}} x_{t} = 1\) with \(x_{0} = 1\) (i.e. the index of the last feature that is 1). What is the reproduction probability of the first state: ?
📗 Answer: .
📗 [4 points] In simulated annealing we move from \(s\) to an inferior neighbor \(t\) with probability \(\exp\left(\dfrac{- \left| f\left(s\right) - f\left(t\right) \right|}{T}\right)\), where \(T\) is the temperature parameter. Suppose \(f\left(s\right)\) = and \(f\left(t\right)\) = and \(T\) = . What is the probability we move to \(t\)?
📗 Note: we are minimizing the score.
📗 Answer: .
📗 [4 points] In a by grid, Tom is located at (, ) and Jerry is located at (, ). Tom uses to find Jerry and the successors of a state (one cell in the grid) are the four neighboring states on the grid (the cells above, below, to the left and to the right). What is the imum number of states that need to be expanded to find (and expand) the goal state? The order in which the successors are added can be arbitrary. Do not count repeated expansion of the same state. Include both the initial and the goal states.
📗 Answer: .
📗 [4 points] Given the list of states in the priority queue (frontier) and the current cost \(g\) and heuristic cost \(h\), what is the largest value of \(x\) so that state \(0\) will be removed (expanded) from the priority queue next in all three informed search strategies: UCS (Uniform Cost Search), (Best First) Greedy Search, and A Search? Break ties by expanding the state with the smallest index.
State 0 1 2 3 4 5
g
h \(x\)

📗 Answer: .
📗 [3 points] Let \(h_{1}\) be an admissible heuristic from a state to the optimal goal, A* search with which ones of the following \(h\) will be admissible? 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] Consider the following zero-sum game tree. player moves first. Draw a new game tree by re-ordering the children of each internal node (including the root), such that the new game is equivalent to the tree above, but alpha-beta pruning will prune as many nodes as possible. (You do not have to submit the drawing.) Enter the number of nodes pruned.

📗 Note: in case the diagram is not clear, the values on the leafs (each sub-branch is a row): .
📗 Answer: .
📗 [3 points] There are two players and \(k\) coins on the table. Players move sequentially with player 1 moving first. Each player chooses to take either one or two coins from the table. The player who takes the last coin wins. For which of the following values of \(k\) = {} does the first player has a winning strategy? Enter the values of \(k\), not the indices.
📗 Answer (comma separated vector): .
📗 [4 points] Given the following game payoff table, suppose the row player uses a pure strategy, and column player uses a mixed strategy playing L with probability \(q\). What is the smallest and largest value of \(q\) in a mixed strategy Nash equilibrium?
Row \ Col L R
U
D

Note: the following is a diagram of the best responses (make sure you understand what they are and how to draw them). The red curve is the best response for the column player and the blue curve is the best response for the row player.

📗 Answer (comma separated vector): .
📗 [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 FX1. 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: 7" 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