nonTransitive.generator: Non-transitive dice generator.

Description Usage Arguments Details Value See Also

View source: R/nonTransitive.R

Description

This function generates Z random non-transitive dice given the number faces and the corresponding non-transitive probabilities.

Usage

1
nonTransitive.generator(dice, faces, max_value = faces, prob, error = 0.001)

Arguments

dice

The number Z of non-transitive dice to generate.

faces

The number of faces of each die.

max_value

The maximum integer allowed as nominal value for the faces. Standard choices are usually max_value = faces (default) or max_value = faces^2.

prob

The probability one wants the set of dice to be non-transitive. If unspecified, a set of dice with different non-transitive probabilities for each pairing will be generated.

error

Computational error to check for machine precision equality. It defaults to 0.001: no need to be specified.

Details

The function randomly generates sets of dice and stops as soon as a non-transitive set of dice matching the specified conditions is found and only if so. As such, it might happen that it never returns any value, should the condition for non-transitive dice not be matched. One may need to manually interrupt the run (time delay is provided, one could set it as max threshold.)

Value

A data.table containing the set of non-transitive dice matching the specified conditions.

See Also

See also is.nonTransitive.


Rdice documentation built on May 2, 2019, 3:46 a.m.