subject
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,}

ansver
Answers: 1

Another question on Mathematics

question
Mathematics, 21.06.2019 17:00
(! ) three cylinders have a height of 8 cm. cylinder 1 has a radius of 1 cm. cylinder 2 has a radius of 2 cm. cylinder 3 has a radius of 3 cm. find the volume of each cylinder
Answers: 1
question
Mathematics, 21.06.2019 18:00
Saline iv fluid bags cost $64.20 for 24, 1000 ml bags from one supplier. a new supplier sells 500 ml bags for $2 each. the hospital uses about 10,000, 1000 ml bags each month. nurses report that about half of the bags are more than half full when they are discarded. if you are going to use only one supplier, which size bag provides the best deal, and how much will you save each month? compare the cost of the new supplier to the current one.
Answers: 1
question
Mathematics, 21.06.2019 20:00
The total number of dental clinics total for the last 12 months was recorded
Answers: 3
question
Mathematics, 21.06.2019 23:30
In the diagram, ab is tangent to c, ab = 4 inches, and ad = 2 inches. find the radius of the circle.
Answers: 2
You know the right answer?
The game dien is played in the following way: you will be given a die with n sides. you will know t...
Questions
question
Physics, 29.01.2021 19:10
question
Mathematics, 29.01.2021 19:10
Questions on the website: 13722367