代做EECS 492 --Introduction to Artificial Intelligence Final Exam代写留学生Matlab语言程序

EECS 492 sample final exam from Fall 2024

Final Exam

EECS 492 -- Introduction to Artificial Intelligence

Problem 1: MDP [17 points]

In this map, the agent starts in square “Start”. Its goal is to choose a sequence of actions that allow it to arrive at the +1 Terminal state. There is one square an agent can’t enter (labeled “Wall” and shaded gray). There are named states: x, y, and z, and unnamed states (blank). There are two terminal states, +1 and -1.

The agent can go up, down, left or right. In each case, the probability of moving in the intended direction (e.g., tries to go left and does go left) is 0.5. The probability of moving either 90o or -90o  (e.g., tries to go left, goes up or down) is 0.25. If the agent hits a wall, either the border of the map or border of the square marked “Wall”, it stays in its current square. Assume Y = 1.

The utility of all states is initialized to 0. The reward associated with transitioning into a state is defined as follows:

a .  If the destination state is a terminal state, the reward is +1 or -1 (see map).

b.  If the destination state is a non-terminal state, then the reward is as specified (“non- terminal reward”) in each problem below.

1.  [2 pts] If the non-terminal reward is 2, which of the following is the optimal policy?

o Left, left, left, right, right, right, right

o Up, up, up, right, right, right, right

o Left, left, left, left, … (forever)

o Right, right, right

2.  [2 pts] If the non-terminal reward is -2, which of the following is the optimal policy?

o Left, left, left, right, right, right, right

o Up, up, up, right, right, right, right

o Left, left, left, left, … (forever)

o Right, right, right

3.  [3 pts] Assume a non-terminal reward of 0. You are trying to calculate the utility of square z and have decided to use the Bellman update equation.  How many update steps are needed for the utility of z to first become non-zero?

o1

o2

o3

o4

4.  [4 pts] Assume a non-terminal reward of -0.25. You perform. one iteration of the Bellman update equation. What is U1 (x)?  Note: diagram repeated for convenience.

5.  [6 pts] Now let’s imagine that the agent is uncertain regarding its starting position.  Recall that the walls are along the edge of the map and on the border of the square marked “Wall”. Your agent can perceive the number of walls in its current square. The agent’s perception of number of walls is correct ¾ of the time and incorrect ¼ of the time. Its belief state is as follows: where o represents all states besides x, y, z. Your agent moves up and perceives two walls. What is the new belief state for state y, bI(y)? Leave your answer in  terms of α , the normalization constant over all states.

Problem 2: Probability and Bayes [11 points]

1.  [4 pts] Suppose that biologists are studying the presence of rabies in bats. They know that 10% of all bats have rabies. However, the biologists have an imperfect rabies test: 90% of the bats who do have rabies test positive for rabies, while 20% of the bats who do not have rabies will also test positive (meaning that they are incorrectly diagnosed with rabies).

Define two Boolean random variables, T and H. Let t represent the event of a positive rabies test, and ¬t a negative test.  Let h represent the event of a bat having rabies, and ¬h a bat not having rabies.

If a trapped bat tests positively for rabies, what is the probability that it actually has rabies? Leave your answer as a fraction.

2.  [2 pts] Suppose we have three random variables: A, B, and C. Write out the definition of conditional probability: P(A|B).

Answer all questions with respect to the following network topology to the right. Leave all probabilities in terms of fractions

3.  [1 pt] Given the network to the right, you can compute any joint probability over the five variables.

o True

o False

4.  [2 pts] Write out the joint probability in terms of

conditional probabilities as suggested by the network structure in the figure.

o P(A, B, C, D, E) = P(EIC , D)P(CIB)P(DIB)P(BIA)

o P(A, B, C, D, E) = P(EIC , D)P(CIB)P(DIB)P(BIA)P(A)

o P(E) = P(EIC, D)P(CIB)P(DIB)P(BIA)P(A)

o P(A, B, C, D, E) = P(EIA, B, C, D)P(CIA, B)P(DIA, B)P(BIA)P(A)

o P(E) = P(EIA, B, C, D)P(CIA, B)P(DIA, B)P(BIA)P(A)

5.  [2 pts] Calculate P(a, ~b, ~c, d, e)

Problem 3: Reinforcement Learning [6 points]

Suppose that an agent will use a Reinforcement Learning (RL) approach to learn more about the world.  Consider the map to the right of this page. There are two terminal squares (C and F). The agent can move in the following ways: up (e.g., B → E), right (e.g., B → C), left (e.g., B → A), down (e.g., E → B).

If the agent hits a wall, it stays in its current square (e.g., if the agent is in A and goes left, the agent stays in state A).  Otherwise, all actions are executed perfectly, as intended by the agent. When an agent reaches the terminal state, there is only one action available (exit) at which point the agent is no longer in this world.

Suppose the agent executes two separate episodes: Episode 1: A, B, E, F and Episode 2: A, B, C.

As it enters a given square, it receives the following rewards: Square F: r = +1, Square C: r = -1, all other squares: r = -0.1.

1.  [2 pts] Use direct utility estimation (DUE) to calculate the utilities after episode 1 (write answers in the table below – answers not written in that table will not be considered)

2.  [2 pts] Use DUE to calculate the utilities after episode 2 (write answers in the table)

3.  [2 pts] What is the final utility estimate for DUE (write answers in the table)

Enter your answers in this table, use NA (not applicable) for any unknown values

A

B

D

E

Episode 1

Episode 2

Final

Problem 4: Neural Networks [10 points]

1.  [1 pt] You have decided to build a neural network classifier to predict how tall a given plant will grow, given information about the amount of light that it receives on a given day. Which loss function is most appropriate for this task?

o Binary cross entropy (BCE)

o Root mean square error (RMSE)

2.  [1 pt] Given an arbitrarily large neural network, any continuous function can be learned.

o True

o False

3.  [2 pts] You should decide when you should stop training your network by assessing performance on the:

o Training data

o Validation data

o Testing data

4.  Consider the neural network architecture, above. The weights are shown on each branch. There are labels, Q4a and Q4b, they refer to the two questions that follow. Assume that the threshold function uses a threshold of 0 (when the function’s input is greater than or equal to 0, it outputs a 1). You are given x = [x0 , 2, 1, -5]. Hint: assign the correct value to x0, as discussed in lecture.

a .  [3 pts] What is the value after the threshold is applied (Q4a in the figure above)?

o0

o1

o None of the above

b.   [3 pts] What is  ^y (Q4b in the figure above)?

Problem 5: Decision Trees [9 points]

1.  Let’s say that you are trying to build a decision tree classifier to classify “Happy”. You have data of the following form.

Data

Sunny

Weekend

Productive

Happy

x1

1

1

1

False

x2

1

0

1

True

x3

0

1

1

True

x4

0

1

0

True

x5

0

1

1

True

x6

0

0

0

False

[1 pt] What is B(1/2)             →

[6 pts] Calculate the information gain over the attribute Productive.

[2 pts] Assume that we split on the attribute Sunny. What is the entropy of the Happy attribute in the branch where Sunny = 0?

o0 o8/10

o6/10 o9/10

o7/10 o1

Problem 6: Concept Questions [19 points]

1.  [1 pt] If A is among B’s k-Nearest Neighbors, then B must be among A’s k-Nearest Neighbors.

o True

o False

2.  [1 pt] BFS has a lower space complexity than DFS.

o True

o False

3.  [1 pt] Multiple nodes in a search tree can represent the same state.

o True

o False

4.  [1 pt] Consider the SAME function. It takes two binary inputs, and outputs a 1 if both inputs are the same, or 0 otherwise. True or False: A perceptron network (without hidden layers) can learn the SAME function.

o True

o False

5.  [1 pt] It is good practice to train a classifier until the training loss gets as low as possible.

o True

o False

6.  [1 pt] Neural networks are maximum margin classifiers.

o True

o False

7.  [1 pt] There are local minima to avoid when minimizing loss in linear regression.

o True

o False

8.  [1 pt] A* is an example of local search.

o True

o False

9.  [1 pt] Fully observable environments are always known.

o True

o False

10. [1 pt] You have created a new agent and you would like it to operate effectively in the

world. You have decided to accomplish this goal using reinforcement learning, specifically one using a model-based approach. True or False: At the end you will always have an estimate of the transition probabilities and the reward function.

o True

o False

11. [1 pt] Select the approach in which you are given a fixed policy, τ

o Passive RL

o Active RL

o Neither

o Both

Two companies, Company One and Company Two, are attempting to rationally maximize their own profit. Each company can either take Action A or Action B. The two companies must decide this simultaneously. The payoff matrix for each company’s profit is shown below, where Company One is the row player and Company Two is the column player.

Two: A

Two: B

One: A

One=$0,     Two=$0

One=$0, Two=-$10k

One: B

One=-$10k, Two=$0

One=-$2k, Two=-$2k

12. [2 pts] What is the dominant strategy for Company One?

o Action A

o Action B

o No dominant strategy

For the following two questions (13 and 14), consider the following knowledge bank (KB):

1.  cat(x) Feline(x)

2.  Bird(x) → ¬cat(x)

3.  ¬cat(Tweety) Λ ¬cat(Robin)

4.  cat(x) Λ Bird(y) EatsBird(x, y)

5.  Bird(Tweety)

6.  Bird(Robin)

13. [1 pts] The KB is written in propositional logic (true/false)

o True

o False

14. [4 pts] Which of the following is entailed by the knowledge base (select all)?

o ¬cat(Tweety)

o cat(sylvester)

o ¬cat(x) V Feline(x)

o cat(x) Λ ¬Feline(x)

o cat(Robin) → Feline(Robin)

15. [1 pt] In minimax and alpha-beta pruning, which player always goes first?

o Max

o Min

o It depends


热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图