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 14:40
1. what is the phythaforean theorem? 2.what do we use it for? 1.what is the distance formula ? 2.what do we use it for?
Answers: 2
question
Mathematics, 21.06.2019 20:20
Abag contains 3 red marbles, 2 blue marbles, and 2 green marbles. one marble is picked, then another marble. assume that the selections are made with replacement. a) find the probability of picking two red marbles with replacement. b) find the probability of picking a red marble and a blue marble. assume the selections are made without replacement. c) find the probability of picking two red marbles without replacement. d) find the probability of picking a red marble and a blue marble without replacement.
Answers: 1
question
Mathematics, 21.06.2019 21:40
The number of chocolate chips in a bag of chocolate chip cookies is approximately normally distributed with a mean of 12611261 chips and a standard deviation of 118118 chips. (a) determine the 2626th percentile for the number of chocolate chips in a bag. (b) determine the number of chocolate chips in a bag that make up the middle 9696% of bags. (c) what is the interquartile range of the number of chocolate chips in a bag of chocolate chip cookies?
Answers: 2
question
Mathematics, 22.06.2019 00:00
Tony is charged $ 50 and additional $0.15 per miles for renting a car. a) represent the cost of renting a car with an equation,and the determine the cost if he drove it70 miles.b) what would be the cost of a car rental if the car was driven 250 miles? show work
Answers: 1
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
Questions on the website: 13722363