Talk:Dice game probabilities: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Test runs: pseudo code please!)
(→‎Test runs: (final) remark)
Line 16: Line 16:
: <s>Second part is ten 5-sided dice vs seven 6-sided dice, no?</s> Never mind, everyone else (i.e. Bearophile and I) used the wrong numbers. Your result is correct. --[[User:Ledrug|Ledrug]] ([[User talk:Ledrug|talk]]) 05:38, 18 January 2015 (UTC)
: <s>Second part is ten 5-sided dice vs seven 6-sided dice, no?</s> Never mind, everyone else (i.e. Bearophile and I) used the wrong numbers. Your result is correct. --[[User:Ledrug|Ledrug]] ([[User talk:Ledrug|talk]]) 05:38, 18 January 2015 (UTC)
:: :-) Still: Is your solution built analytically? Pseudocode? My attempt to translate it to REXX got stuck in the recursion. :-( --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 07:34, 18 January 2015 (UTC)
:: :-) Still: Is your solution built analytically? Pseudocode? My attempt to translate it to REXX got stuck in the recursion. :-( --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 07:34, 18 January 2015 (UTC)

::: Oh well. REXX and ooRexx show now the algorithm. What have we learned? Testing is always a good idea! --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 07:40, 19 January 2015 (UTC)

Revision as of 07:40, 19 January 2015

Test runs

Test runs with 10000 samples show
0.5751 player 1 wins (agrees with shown probabilities)
0.3535 player 2 wins
0.0714 draws
and for the second part:
0.6405 player 1 wins (differs considerably)
0.3147 player 2 wins
0.0448 draws

Can somebody show the pseudo code ?

--Walterpachl (talk) 15:14, 16 January 2015 (UTC)

Second part is ten 5-sided dice vs seven 6-sided dice, no? Never mind, everyone else (i.e. Bearophile and I) used the wrong numbers. Your result is correct. --Ledrug (talk) 05:38, 18 January 2015 (UTC)
:-) Still: Is your solution built analytically? Pseudocode? My attempt to translate it to REXX got stuck in the recursion. :-( --Walterpachl (talk) 07:34, 18 January 2015 (UTC)
Oh well. REXX and ooRexx show now the algorithm. What have we learned? Testing is always a good idea! --Walterpachl (talk) 07:40, 19 January 2015 (UTC)