11-24-2011, 01:23 PM | #21 |
Join Date: Sep 2004
Location: Canada
|
Re: The bell-curve for Luck
I make computers do it.
Code:
#!perl -w use strict; use Games::Rolldice 'roll'; use List::Util qw(sum max min); my %results; my $count = 1000000; for (my $x =0; $x<$count; $x++) { my $result = min(roll("3d6", '-sum' => 'true'),roll("3d6", '-sum' => 'true'),roll("3d6", '-sum' => 'true'),roll("3d6", '-sum' => 'true')); $results{$result}+= 1; } my %result_analysis; foreach my $roll (sort keys %results){ $result_analysis{$roll} = sprintf('%05f',($results{$roll}/$count)); print "$roll:\t$result_analysis{$roll}\n"; }
__________________
All about Size Modifier; Unified Hit Location Table A Wiki for my F2F Group A neglected GURPS blog Last edited by Bruno; 11-24-2011 at 01:24 PM. Reason: Cleaning up messy code |
11-24-2011, 01:26 PM | #22 |
Join Date: Sep 2004
Location: Canada
|
Re: The bell-curve for Luck
That really illustrates why I do it the "lazy" way - 19 lines of code (counting blank lines for readability), then I just run the stupid thing and stop thinking about it. Five minutes later, results pop out.
__________________
All about Size Modifier; Unified Hit Location Table A Wiki for my F2F Group A neglected GURPS blog |
11-24-2011, 01:30 PM | #23 |
Join Date: Aug 2009
|
Re: The bell-curve for Luck
|
11-24-2011, 01:37 PM | #24 |
Join Date: Nov 2007
Location: The City of Subdued Excitement
|
Re: The bell-curve for Luck
I take your point, but I think it's useful as a benchmark for those who are used to thinking about their chances of beating, say, a 12 on one roll.
Last edited by Grouchy Chris; 11-24-2011 at 02:36 PM. |
11-24-2011, 01:49 PM | #25 |
Join Date: Apr 2008
Location: Land of the Beer, Home of the Dirndls
|
Re: The bell-curve for Luck
Code:
my $result = min(roll("3d6", '-sum' => 'true'),roll("3d6", '-sum' => 'true'),roll("3d6", '-sum' => 'true'),roll("3d6", '-sum' => 'true')); |
11-24-2011, 01:53 PM | #26 |
Join Date: Sep 2004
Location: Canada
|
Re: The bell-curve for Luck
Because the last time I rand it, it was for Ts_ - who asked for a "best of 4" scenario :)
__________________
All about Size Modifier; Unified Hit Location Table A Wiki for my F2F Group A neglected GURPS blog |
11-24-2011, 01:54 PM | #27 |
Join Date: Apr 2008
Location: Land of the Beer, Home of the Dirndls
|
Re: The bell-curve for Luck
|
11-24-2011, 01:56 PM | #28 | |
Never Been Pretty
Join Date: Jan 2005
|
Re: The bell-curve for Luck
Getting an 18 in best of 4 happens once in about 2.18 billion rolls. And getting 17 is 15 times more likely.
Quote:
|
|
11-24-2011, 02:27 PM | #29 |
Join Date: Jan 2005
Location: Charlotte, North Caroline, United States of America, Earth?
|
Re: The bell-curve for Luck
Could you do that with say, 4 d6, drop the lowest 2, as well as 5d6, drop lowest 2? what about roll 5 and drop the lowest three, roll 6 and drop the lowest three?
__________________
Hydration is key |
11-24-2011, 02:32 PM | #30 | |
Join Date: Apr 2010
Location: Land of the Britons
|
Re: The bell-curve for Luck
Quote:
Also, AnyDice.com does some fun statistical read outs for various die rolling methods and (as the name suggests) even fictional sided die, so you can check that out too.
__________________
...like a monkey with a wrench. |
|
Thread Tools | |
Display Modes | |
|
|