simulate: Simulate different strategies in variations of Mastermind

Description Usage Arguments Value Examples

View source: R/simulate.R

Description

Simulate different strategies in variations of Mastermind

Usage

1
simulate(colors, pegs, strategy, n)

Arguments

colors

integer from 1 to 9. Number of colors in game

pegs

integer from 1 to 9. Number of pegs (slots) in game

strategy

character, one of "Knuth", "Doable"

n

integer, number of simulations to run

Value

vector with counts of the number of guesses used

Examples

1
2
# Not run:
simulate(colors = 3, pegs = 2, strategy = "Knuth", n = 10)

lassehjorthmadsen/masteRmind documentation built on Dec. 21, 2021, 9:40 a.m.