Question: Module 2 - Calculate expected utility In this module, you are supposed to complete the 2 functions: getEU, getMaxEUFull. Task 3: expected utility of an


Module 2 - Calculate expected utility In this module, you are supposed to complete the 2 functions: getEU, getMaxEUFull. Task 3: expected utility of an action The formula is EU(a) = Z R(a, s)P(s) Since there is no state transition in our problem, we need to calculate expected utility of an action a by calculating the expected reward received by taking the action. You are supposed to complete the function getEU in the valueOfInfo.py le. There are three input parameters for the function getEU. (a) action - a string indicating which action a is being evaluated. (b) sDistribution - A dictionary representing the probability distribution of the current state 3. The keys of dictionary are the possible states 5 and the values of the dictionary are the corresponding probability 10(8)- (c) rewardTable - A dictionary representing the reward from taking action a in state 3. It is represented as {.91 {a : R(a,s)}}. The return value of the function getEU is a scalar representing the expected utility of the input action a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
