Talk:Pig the dice game/Player: Difference between revisions

From Rosetta Code
Content added Content deleted
(Estimator)
Line 7: Line 7:


: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.] --[[User:Rdm|Rdm]] 19:17, 14 September 2012 (UTC)
: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.] --[[User:Rdm|Rdm]] 19:17, 14 September 2012 (UTC)

::That said, using philosophy behind "you don't have to be faster than the bear", a strategy which takes into account your opponent's score could be superior. For this, we'd need a good estimate of how many turns the opponent is likely to need, and we might have to iterate on that (shades of iterated prisoner's dilemma...). I've not thought this through to see if there's a plausible stable advantage here for any likely games. --[[User:Rdm|Rdm]] 19:22, 14 September 2012 (UTC)

Revision as of 19:22, 14 September 2012

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)
That said, using philosophy behind "you don't have to be faster than the bear", a strategy which takes into account your opponent's score could be superior. For this, we'd need a good estimate of how many turns the opponent is likely to need, and we might have to iterate on that (shades of iterated prisoner's dilemma...). I've not thought this through to see if there's a plausible stable advantage here for any likely games. --Rdm 19:22, 14 September 2012 (UTC)