![]() |
![]() |
#21 |
Join Date: Sep 2004
Location: Canada
|
![]()
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 GURPS blog Last edited by Bruno; 11-24-2011 at 02:24 PM. Reason: Cleaning up messy code |
![]() |
![]() |
![]() |
#22 |
Join Date: Sep 2004
Location: Canada
|
![]()
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 GURPS blog |
![]() |
![]() |
![]() |
#23 |
Join Date: Aug 2009
|
![]() |
![]() |
![]() |
![]() |
#24 |
Join Date: Nov 2007
Location: The City of Subdued Excitement
|
![]()
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 03:36 PM. |
![]() |
![]() |
![]() |
#25 |
Join Date: Apr 2008
Location: Land of the Beer, Home of the Dirndls
|
![]() Code:
my $result = min(roll("3d6", '-sum' => 'true'),roll("3d6", '-sum' => 'true'),roll("3d6", '-sum' => 'true'),roll("3d6", '-sum' => 'true')); |
![]() |
![]() |
![]() |
#26 |
Join Date: Sep 2004
Location: Canada
|
![]()
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 GURPS blog |
![]() |
![]() |
![]() |
#27 |
Join Date: Apr 2008
Location: Land of the Beer, Home of the Dirndls
|
![]() |
![]() |
![]() |
![]() |
#28 | |
Never Been Pretty
Join Date: Jan 2005
|
![]()
Getting an 18 in best of 4 happens once in about 2.18 billion rolls. And getting 17 is 15 times more likely.
Quote:
|
|
![]() |
![]() |
![]() |
#29 |
Join Date: Jan 2005
Location: Charlotte, North Caroline, United States of America, Earth?
|
![]()
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?
__________________
A shadu an la illa illah Allah, we shadu anna Muhammadar Rasul |
![]() |
![]() |
![]() |
#30 | |
Join Date: Apr 2010
Location: Land of the Britons
|
![]() 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 | |
|
|