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

From Rosetta Code
Content added Content deleted
(Undo revision 144068 by Paddy3118Doh!)
Line 4: Line 4:
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. --[[User:Paddy3118|Paddy3118]] 05:57, 14 September 2012 (UTC)
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. --[[User:Paddy3118|Paddy3118]] 05:57, 14 September 2012 (UTC)


==Strategy==
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:
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:


Line 9: Line 10:


::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 -- sometimes playing more conservatively because we know that our opponent doesn't have a good chance of winning. That said, I have not completely convinced myself that this would ever be a good idea -- intuitively, it seems like it could be, but I have not had the time to think it through, yet. --[[User:Rdm|Rdm]] 19:22, 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 -- sometimes playing more conservatively because we know that our opponent doesn't have a good chance of winning. That said, I have not completely convinced myself that this would ever be a good idea -- intuitively, it seems like it could be, but I have not had the time to think it through, yet. --[[User:Rdm|Rdm]] 19:22, 14 September 2012 (UTC)

I was thinking of implementing a simple always roll n times then hold. I could then do stats on randomly varying n for each player and see if there are any patterns for the winner. But as yet I have no prog at all so its just an idea... --[[User:Paddy3118|Paddy3118]] 03:09, 15 September 2012 (UTC)

Revision as of 03:09, 15 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)

Strategy

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 -- sometimes playing more conservatively because we know that our opponent doesn't have a good chance of winning. That said, I have not completely convinced myself that this would ever be a good idea -- intuitively, it seems like it could be, but I have not had the time to think it through, yet. --Rdm 19:22, 14 September 2012 (UTC)

I was thinking of implementing a simple always roll n times then hold. I could then do stats on randomly varying n for each player and see if there are any patterns for the winner. But as yet I have no prog at all so its just an idea... --Paddy3118 03:09, 15 September 2012 (UTC)