Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The children's game Chutes and Ladders is based on an ancient Indian game called Snakes and Ladders (see https://en.wikipedia.org/wiki/Snakes_and_Ladders). The game is played on a

image text in transcribedimage text in transcribedimage text in transcribed

The children's game Chutes and Ladders is based on an ancient Indian game called Snakes and

Ladders (see https://en.wikipedia.org/wiki/Snakes_and_Ladders). The game is played on a

100-square board. Each player has a token and takes turns rolling a six-sided die and moving their

token by the corresponding number of squares. If a player lands on a ladder, they immediately

move up the ladder to a higher-numbered square. If they move to a chute, or snake, they drop

down to a lower-numbered square. The nishing square 100 must be reached by an exact roll of

the die (or by landing on square 80 whose ladder climbs to the nish). The rst player to land on

square 100 wins.

The game is a Markov chain since the player's position only depends on their previous position and

the roll of the die. The chain has 101 states as the game starts will all players o the board (state

0).

1. (10 points) (Without Python) The board for a modied Snakes and Ladder game is shown in

Figure 1. The game is played with a tetrahedron (4-sided) die.

Figure 1: Modied Snakes and Ladder game board

(a) Find the expected length of the game. That is, what is the average number of plays/moves

needed to read the nish.

(b) Assume that your friend Loki is on square 6. Find the probability that Loki will nd

himself on square 3 before nishing the game.

2. (30 points) (With Python) In this Python exercise, you will be estimating the average number

of plays/moves until the game is nished and the probability that a person starting at square

6 will nd themselves on square 3 before nishing the game. Be sure to annotate your code

with short explanations of what you are doing (worth 10 points).

Suppose (as above) that we are playing Snakes and Ladders on a modied game board.

(a) Simulate playing 10,000 games. Compute the average number of moves until the game is

nished. Use the print function to print your answer. Be sure to label your results. For

example,

print('The average number of moves before a game is finished is %s.'

% expectedNumberOfMoves)

(b) Simulate playing 10,000 games, but this time, start each game from square 6. Compute

the probability that a person starting at square 6 will nd themselves on square 3 before

nishing the game. Use the print function to print your answer.

(c) Take a screenshot showing your code and your results together (e.g. side by side).

image text in transcribedimage text in transcribedimage text in transcribed
sentences explaining your reasoning or (b) annotate your math work with brief explanations. Please label any random variables or events that your use. The children's game Chutes and Ladders is based on an ancient Indian game called Snakes and Ladders (see https://en.Wikipedia.org/wiki/Snakes_and_l_adders). The game is played on a IOUsquare board. Each player has a token and takes turns rolling a six-sided die and moving their token by the corresponding number of squares. If a player lands on a ladder, they immediately move up the ladder to a higher-numbered square. If they move to a chute, or snake, they drop down to a lowernumbered square. The nishing square 100 must be reached by an exact roll of the die (or by landing on square 80 whose ladder climbs to the nish). The rst player to land on square 100 wins. The game is a Markov chain since the player's position only depends on their previous position and the roll of the die. The chain has 101 states as the game starts will all players o' the board (state 0). l. (10 points) (Without Python) The board for a modied Snakes and Ladder game is shown in Figure 1. The game is played with a tetrahedron (4-sided) die. Figure 1: Modied Snakes and Ladder game board (a) Find the expected length of the game. That is, What is the average number of plays/ moves needed to read the nish. (b) Assume that your friend Loki is on square 6. Find the probability that Loki will nd himself on square 3 before nishing the game. l. (10 points) {Without Python) The board for a modied Snakes and Ladder game is Shawn in Figure 1' The game is played with a tetrahedron (4-sided) diet Figure 1: Modied Snak- and Ladder game board (a) Find the expected length if the game That is, What is the average number of plays/waves needed to read the nish. (b) Assume that your friend Loki is on square 6. Find the probability that Loki will nd himself on square 3 before nishing the game. 2. (30 points) (With Python) In this Python exercise, you will be estimating the average number of plays] moves until the game is nished and the probability that a person starting at square 6 will nd themeelves (m square 3 before nishing the game, He sure tn annotate vnur code 2. (30 points) (With Python) In this Python exercise, you will be estimating the average number of plays] moves until the game is nished and the probability that a person starting at square 6 will nd themselves on square 3 before nishing the game. Be sure to annotate your code with short explanations of what you are doing (worth 10 points). Suppose (as above) that We are playing Snakes and Ladders on a. modied game board. (a) Simulate playing 10,000 games. Compute the average number of moves until the game is nished. Use the print function to print your answer. Be sure to label your results. For example, print('The average number of moves before a game is finished is '/.s . ' 'l. expectedNumbeerMeves) (b) Simulate playing 10,000 games, but this time, start each game from square 6. Compute the probability that a person starting at square 6 will nd themselves on square 3 before nishing the game. Use the print function to print your answer. (e) Take a sereenshot showing your code and your results together (eg. side by side). Python Code Hints I numpy. linalg. solve (Lb) will solve the matrix equation A: : b. numpy. ident ity (n) will give you the n X 11 identity matrix. \"mum \"n+r

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Smooth Manifolds

Authors: Rajnikant Sinha

1st Edition

8132221044, 9788132221043

More Books

Students also viewed these Mathematics questions