Talk:Pig the dice game/Player

From Rosetta Code
Revision as of 19:17, 14 September 2012 by Rdm (talk | contribs) (Estimator)

Very draft task

Unlike most of the tasks I start, I have started this one without having a Python solution to hand and so I am unsure of how large a task this is, and may have left important things out of the task description that may lead to non-compatible future edits .

Thanks Tim T. for the many corrections to the hopeless grammar I initially had in Pig the dice game; I hope my English has improved. --Paddy3118 05:57, 14 September 2012 (UTC)

I've put together an estimator for use in deciding whether to reroll or not. Here's pseudo-code for people that cannot read J:

consider each roll, for non-1 rolls, each roll's base value is the minimum of itself and 100-(sum of dice currently rolled). For a roll of 1, the value is -(uncommitted rolls). Average these to get the estimated value of the current possibilities. [Or, of course, if you just want to know if the result is positive, you do not need to divide by 6.] --Rdm 19:17, 14 September 2012 (UTC)