Mathematics
Mathematics, 24.01.2020 05:31, daedae96

The game dien is played in the following way: you will be given a die with n sides. you will know the size of n, and can assume that n is a value greater than 1 and less than or equal to 30. you will be given a bit mask vector isbadsiderepresenting the sides of a die that will make you lose. the vector will be of size n, and 1 indexed. (there is no 0 side) you start with 0 dollars. at any time you have the option to roll the die or to quit the game if you decide to roll: and you roll a number not in isbadside, you receive that many dollars. (eg. if you roll the number 2 and 2 is not active -- meaning the second element of the vector is 0 -- in isbadside, then you receive 2 dollars) repeat step 4. and you roll a number in isbadside, then you lose all money obtained in previous rolls and the game ends. if you decide to quit: i. you keep all money gained from previous rolls and the game ends. procedure for this problem, determine an optimal policy for playing the game dien for n sides. you will be givenn and the array isbadside which indicates which sides are bad. as you will see, the optimal policy for this game will depend onyour current bankroll. you can try solving this problem either by creating an mdp of the game (state, action, transition, reward function, and assume a gamma of 1) and then calculating the optimal state-value function or you can plug-in values and solve directly using the bellman equations. what is the expected amount of dollars for this game if you follow an optimal policy? that is, what is the optimal state-value function for the initial state of the game? provide answers for the problems you are given. your answer must be correct to 3 decimal places. examples the following examples can be used to verify your calculation is correct. input: n = 21, isbadside = {1,1,1,1,0,0,0,0,1,0,1,0,1,1,0,1,0, 0,0,1,0}, output: 7.3799 input: n = 22, isbadside = {1,1,1,1,1,1,0,1,0,1,1,0,1,0,1,0,0, 1,0,0,1,0}, output: 6.314 input: n = 6, isbadside = {1,1,1,0,0,0}, output: 2.5833 question: solve the problem for the following inputs: input: n=5, isbadside={0,1,1,1,1,}

answer
Answers: 1

Other questions on the subject: Mathematics

image
Mathematics, 20.06.2019 18:04, jak000067oyyfia
Do u just plot the numbers on the graph like (1,
Answers: 1
image
Mathematics, 21.06.2019 17:30, ultimateapes
Jacks bank statement shows an account balance of -$25.50. which describes the magnitude, of size, of the debt in dollars
Answers: 2
image
Mathematics, 21.06.2019 18:00, jakeyywashere
What is an alternate exterior angle
Answers: 1
image
Mathematics, 21.06.2019 21:00, eswi9731
Estimate the area under the curve f(x) = 16 - x^2 from x = 0 to x = 3 by using three inscribed (under the curve) rectangles. answer to the nearest integer.
Answers: 1
Do you know the correct answer?
The game dien is played in the following way: you will be given a die with n sides. you will know t...

Questions in other subjects:

Konu
Mathematics, 02.02.2021 17:50
Konu
Mathematics, 02.02.2021 17:50
Konu
Health, 02.02.2021 17:50