FrequencyOfSquaresByPercentage: Finds the Frequency of each Square by Percentage in the Game...

Description Usage Arguments Details Value Warning Author(s) Examples

Description

This function uses the function SnakesAndLaddersGame to estimate the frequency of each square dependent on the number of players.

Usage

1
2
FrequencyOfSquaresByPercentage(number.of.players = 2,
              number.of.trials = 100, vector = FALSE)

Arguments

number.of.players

A single numeric value that represents the number of players you wish to run the trial with.

number.of.trials

A single numeric value that represents the number of trials you wish to run. The more trials the more accurate the estimation.

vector

Takes values TRUE or FALSE, if TRUE will display results as a vector. This is sometimes a much nicer display of results.

Details

Function uses the SnakesAndLaddersGame function to find and display the frequency of how often a square is landed on, given a set number of players. it is also very useful to plot this data to see the distribution of how often a square is landed on.

Value

Fequency.of.squares

A numeric vector or matrix which represents how often a square is landed on in the game of Snakes and Ladders.

Warning

I have not put a limit on the amount of time that this function will run. This is to allow many of trials.

Author(s)

Hector Haffenden haffendenh@cardiff.ac.uk

Examples

1
2
3
4
5
6
7

SnakesAndLaddersAnalysis documentation built on May 2, 2019, 2:15 p.m.