`This paper sent to me in 2001 --djr`

A Mathematical Analysis

and Computer Simulation

By Dr. David L. Morgan

# MODELS

The Null Model:

In the Null Model there are no chutes and no ladders. On each turn, the counter will advance by between 1 and 6 spaces, or 3.5 spaces on average. Since the counter needs to travel 100 space to win, a typical null game will take 100/3.5 or 28.6 moves to complete.

The Equal Probability Model:

In this model we assume that there is an equal probability to find yourself on any particular square in the game. Of the 100 squares in the game, there are 81 ordinary squares, 9 squares with ladders, and 10 squares with chutes. On the ordinary squares, the counter will advance by 3.5 space on average, while the advance or retreat on the other squares will depend on the specifics of the chute or ladder in question. We can add up all the possibilities to produce an average advance per turn given by?

Avg = ( 81 x 3.5 + S ladders - S chutes ) / 100

Given the particulars of the chutes and ladders on the current Chutes and Ladders game board, this gives us

Avg = (81 x 3.5 + 195 - 243 ) / 100

## Avg= 2.35 spaces per turn

Given these assumptions a typical game will last 42.5 turns - considerably longer than the null game. (I thought so!!)

# SIMULATION

The Simulation is programmed in C, and runs through an exact replica of the Chutes and Ladders game, with all the chutes and ladders in their proper places. It allows thousands of games to be played in under a minute. The C source code follows.

SOURCE CODE

```#include<stdlib.h>
#include<stdio.h>
#include<math.h>

int turn, square;
long game, totalgames;
int seed;
float RunningTurnTotal;
float average;

main()
{
printf("Welcome to the Chutes and Ladders simulation \n");
printf("...\n");
srand(1);

printf("How many games would you like me to run? __ ");
scanf("%i",&totalgames);
printf("\n You have chosen to run %i games... thank you! \n", totalgames);
do{
RunningTurnTotal=0.0;
game=1;

do{
turn=0;
square=0;                             /** Reset game **/
do                                           /** Begin game loop  **/

{
++turn;
RunningTurnTotal = RunningTurnTotal + 1;

square = square + 1 + rand()%6;       /** Spin and move  **/

if (square == 4) {square=14; ++ladderhit[1];}
if (square == 9) {square=31; ++ladderhit[2];}
if (square == 21) {square=42; ++ladderhit[3];}
if (square == 28) {square=84; ++ladderhit[4];}
if (square == 36) {square=44; ++ladderhit[5];}
if (square == 51) {square=67; ++ladderhit[6];}
if (square == 71) {square=91; ++ladderhit[7];}

if (square == 98) {square=78; ++chutehit[0];} /** Chutes ? **/
if (square == 95) {square=75; ++chutehit[1];}
if (square == 93) {square=73; ++chutehit[2];}
if (square == 87) {square=24; ++chutehit[3];}
if (square == 62) {square=19; ++chutehit[4];}
if (square == 64) {square=60; ++chutehit[5];}
if (square == 56) {square=53; ++chutehit[6];}
if (square == 49) {square=11; ++chutehit[7];}
if (square == 48) {square=26; ++chutehit[8];}
if (square == 16) {square=6; ++chutehit[9];}

} while (square<100);

printf("\n\n Game over after %d turns\n", turn);

++game;

} while (game<totalgames);

printf("\nSimulation complete... beginning statistical analysis...\n\n");

printf("Total number of games played: %d \n", game);
printf("Total number of turns: %f \n", RunningTurnTotal);
average = RunningTurnTotal / game;
printf("Avg number of turns per game: %f \n", average);
printf("\n");
ChuteStats();
printf("\n");

printf("\n\n
Would you like to run the simulation again? (1=Yes)...");
}
while
}

ChuteStats()

printf("Chute9: %d                \n", chutehit[9]);
}

```

Results

Total number of games played: 10,000

Total number of turns: 357534