I attached a file.

I attached a file.


In this programming project we will simulate the carnival game Razzle Dazzle, using a Matlab computer program. Our goal in this project will be to do a fact check on some of the numbers and conclusions brought forth in the video. 1. As a first step, watch the Razzle Dazzle Video to better understand the rules of the game. In particular, note the following: a. The composition of the board including the number of holes on the board and the distribution of the numbers that are assigned to those holes. b. The number of marbles that are rolled each time. c. The table used to assign points to each roll. d. The sequence of game play and how the game is won. e. The cost to play the game. 2. Our initial programming goal is to determine the average number of rolls required to win the game. This will be done by running many (i.e., millions) of game simulations to determine this average. 3. Before doing any programming, formulate a general outline/strategy on how you will model the game. 4. When writing your code, be sure to also follow all of the guidelines provided regarding documentation. Programming Tasks Razzle Dazzle Assignment #1 To get everyone started, complete the following three tasks. 1. In your script, create an array that is the same size (rows, cols) as the playing board and has the specified numbers associated with each location on the board. You may choose to resize this array in some manner to facilitate the game simulation. 2. Simulate a roll of all of the marbles, where the probability of a marble landing in any given hole is completely random. Be careful so that your algorithm ensures that two or more marbles cannot be assigned to the same hole. 3. After the roll, have the script total the numbers associated with the holes where the eight marbles landed. Razzle Dazzle Assignment #2 Edit your script from Razzle Dazzle Assignment #1 to complete the following two additional tasks. 4. Create a “points” vector that stores the number of points for a given dice total. This vector should store point values that are consistent with the points table shown in the video. 5. For a given dice total (from task 3), your script should determine the points associated with that roll. For example if the dice total is 16, then the player gets 10 points, so points(16) would have to store a value of 10. Razzle Dazzle Assignment #3 After completing the first two assignments (first 5 tasks), your script should create a simulated board and points table and find the total points associated with a random roll of the eight marbles. Edit your script from Razzle Dazzle Assignment #2 to complete the following additional tasks. 6. Allow the user to input the number of simulated games. Note that a simulated game is a complete game that is terminated by the player eventually winning. In this scenario, the game is always terminated by a player reaching 100 points, not running out of money. 7. For the total number of simulated games, determine the average number of plays (i.e., rolls) that is required for the player to win the game. According to the video, this average number of plays is expected to be approximately 5,239. 8. For the total number of simulated games, determine the minimum number of plays (i.e., rolls) that results in the player winning the game. 9. For the total number of simulated games, determine the maximum number of plays (i.e., rolls) that results in the player winning the game. 10. For the total number of simulated games, determine the minimum amount the player would need to spend that would result in a winning game. 11. a. Start the game with the cost of a roll being $1. b. Note that a roll of 29 will result in zero points but will increase the cost to play by a factor of 2. 11. Output your results for every 1000 simulated games. 12. Thoroughly document your code so that it can be easily interpreted.
Apr 11, 2023
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here