koadah
Joined: Mar 30, 2005
|
  Posted:
Jan 04, 2006 - 11:30 |
|
Buur wrote: | Pie.... Pie pie pie..... Want pie now..... Pie ... PIE! PIE! PPPPPPPIIIIIIIIEEEEEEE!!!!!!!!
-Buur |
Yet more nonsense!
What is the probability that just saying "pie, pie, pie" will actually get you a kind of pie that you like?
How many kinds of pie are there? How many do you like? What kind of RNG are you using?
Will you have beer with the pie? How much beer do you need to drink before any pie will taste good? |
_________________
O[L]C 2016 Swiss! - 19th June! ---- All Star Bowl XII - Teams of Stars - Sign up NOW! |
|
Vicimus
Joined: Nov 16, 2005
|
  Posted:
Jan 04, 2006 - 11:32 |
|
It's a psuedo-pie and thus will cheat you. If you eat it you will consistently roll double 1s. |
|
|
Rynkky
Joined: Aug 03, 2004
|
  Posted:
Jan 04, 2006 - 11:35 |
|
Vicimus wrote: | No, it proves my maths was flawed. Nothing wrong with the Java RNG, just my brain.
The numbers where all right, I was just configuring the percentages incorrectly. I mean, do you really think the people at Java are so stupid they can't even create a "consistently inconsistent" random number between 1 and 6? ... gimme a break.
Anyway, the argument is closed. Look now. |
Heh, you obviously missed the irony in my post. |
|
|
koadah
Joined: Mar 30, 2005
|
  Posted:
Jan 04, 2006 - 11:36 |
|
Vicimus wrote: | I have no idea. JavaScript was invented by the same people who made Java, although they are two different things really. JavaScript is interpreted by whatever browser you are using. The best way to really test the Java RNG would be to look at that page through a java browser. But that's just getting silly. I can guarantee now there will not be any discernable difference in the results. Any random number generator from any programming language is going to be absolutely fine and unfaultable for our purposes. Hell, even for online gambling purposes.
|
Surely javascript was invented by Netscape and java was invented by Sun.
I have never heard anything to sugest that they are linked in anyway.
EDIT:
Vicimus wrote: |
The best way to really test the Java RNG would be to look at that page through a java browser.
|
No. It would be to code the test in java and not javascript.
You may get the same result, you may not.
I suppose it is a fair bet, but how do we know that different JVMs will always produce the same set of random numbers. Anyone tried IBM?
I assume that the client would throw a sunc error if there was a problem. |
_________________
O[L]C 2016 Swiss! - 19th June! ---- All Star Bowl XII - Teams of Stars - Sign up NOW! |
|
Vicimus
Joined: Nov 16, 2005
|
  Posted:
Jan 04, 2006 - 11:49 |
|
Koadah,
JavaScript was definitely first used in Netscape ... but I thought they were in cahoots with Sun to topple the Microsoft empire. Who then came up with "JScript" (that interprets JavaScript with a MS flavour). In-fact, I'm 95% sure that's right.
Rynkky,
Sorry mate. I think I did, I just was unsure. People have been saying all sorts of strange things and I am having trouble keeping up. |
|
|
Vicimus
Joined: Nov 16, 2005
|
  Posted:
Jan 04, 2006 - 11:55 |
|
koadah wrote: |
No. It would be to code the test in java and not javascript. | JavaScript is an interpretted language. When you call the Math.Random function it says to the browser "choose a random number". If the browser was written in Java it would obviously choose that random number using the Java Virtual Machine and the in-built java random number generator. What I do not know is if there is some stipulation that says every browser that interprets JavaScript has to do so using the same random number generating algorithm.
Whatever, I'm 100% sure there would be no statistical difference. I actually (like I said in my other post) wrote this in Java first. I translated it to JavaScript only so it was accessable to everyone else on The Internet without bothering with an Applet. |
|
|
fen
Joined: Sep 10, 2005
|
  Posted:
Jan 04, 2006 - 11:58 |
|
Quote: | 1% - the probability of a zombie picking up the ball that is inside a tackle zone and then dodging out. |
Is that right? Cause by my figuring it's 5/6 to pick up the ball then 4/6 to dodge out. Not including a team reroll. Which doesn't feel like it works out at 1%.
I'm not up for doing the math but as an estimate I thought it was nearer 16%. Curious because I've managed this with AG2 players a lot more than 1% of the time. |
|
|
koadah
Joined: Mar 30, 2005
|
  Posted:
Jan 04, 2006 - 12:02 |
|
Vicimus wrote: | Koadah,
JavaScript was definitely first used in Netscape ... but I thought they were in cahoots with Sun to topple the Microsoft empire. Who then came up with "JScript" (that interprets JavaScript with a MS flavour). In-fact, I'm 95% sure that's right.
|
Netscape were the first company to licence java that does not mean that any java code went into javascript.
Sure everyone tried to gang up on microsoft. In those days MS thought that MSN would be their own rival internet! (continue reading when you have stopped laughing).
So, you may be right. But you may be testing completely different RNGs. If you are using IE then you definitely are.
I do agree that as far as the game is concerned it doesn't really matter. |
_________________
O[L]C 2016 Swiss! - 19th June! ---- All Star Bowl XII - Teams of Stars - Sign up NOW! |
|
Topper
Joined: Aug 03, 2003
|
  Posted:
Jan 04, 2006 - 12:05 |
|
Actually I think it is 16, 67% without a RR.
The chance of picking up is 1/3, and the odds of dodging is 1/2 so it´s 1/3*1/2=1/6=16,67%
I think I´m right at least |
|
|
Vicimus
Joined: Nov 16, 2005
|
  Posted:
Jan 04, 2006 - 12:05 |
|
Sorry. Typo. You guys are obviously right about the zombie.
Regarding JavaScript and Java, who knows? Not me. But I don't think it alters the point at all. I can tell you first-hand that the results were no different running to code thru Java. |
|
|
koadah
Joined: Mar 30, 2005
|
  Posted:
Jan 04, 2006 - 12:15 |
|
Vicimus wrote: | koadah wrote: |
No. It would be to code the test in java and not javascript. | JavaScript is an interpretted language. When you call the Math.Random function it says to the browser "choose a random number". If the browser was written in Java it would obviously choose that random number using the Java Virtual Machine and the in-built java random number generator. What I do not know is if there is some stipulation that says every browser that interprets JavaScript has to do so using the same random number generating algorithm.
Whatever, I'm 100% sure there would be no statistical difference. I actually (like I said in my other post) wrote this in Java first. I translated it to JavaScript only so it was accessable to everyone else on The Internet without bothering with an Applet. |
OK, I am just funning.
The pure java browser idea is not 'best' because most of your users will not have a pure java browser so will need to find and install one. Most of them will have a java enabled browser that could run an applet.
You still need to be sure that the same JVM is running the game, the pure java browser and the applet. Otherwise you may as well pick any C library and test that. |
_________________
O[L]C 2016 Swiss! - 19th June! ---- All Star Bowl XII - Teams of Stars - Sign up NOW! |
|
Vicimus
Joined: Nov 16, 2005
|
  Posted:
Jan 04, 2006 - 12:23 |
|
Hehehe. You're just putting doubts in peoples heads now. I'd bet my right ball that the results would not show any statistcal difference no matter what language you used. |
|
|
Rynkky
Joined: Aug 03, 2004
|
  Posted:
Jan 04, 2006 - 12:29 |
|
Very simple randomn number tester in Java.
Compile
javac RandomNumberGenerator.java
Run
java RandomNumberGenerator 6 2000000
Results
Number 1 was rolled 333364 times (16.7% of all rolls)
Number 2 was rolled 332975 times (16.6% of all rolls)
Number 3 was rolled 333489 times (16.7% of all rolls)
Number 4 was rolled 333630 times (16.7% of all rolls)
Number 5 was rolled 333014 times (16.7% of all rolls)
Number 6 was rolled 333528 times (16.7% of all rolls)
Code
Code: | import java.util.Random;
public class RandomNumberTester
{
private int sides;
private int numberOfRolls;
private long[] rolls;
private Random randomizer;
public static void main( String[] args )
{
RandomNumberTester rnt = new RandomNumberTester(
Integer.valueOf( args[ 0 ] ).intValue(),
Integer.valueOf( args[ 1 ] ).intValue() );
rnt.runTest();
rnt.showResults();
}
private RandomNumberTester( int sides, int numberOfRolls )
{
this.sides = sides;
this.numberOfRolls = numberOfRolls;
rolls = new long[ sides + 1 ]; // slot 0 wasted
randomizer = new Random();
}
private void runTest()
{
for( int i = numberOfRolls; i > 0; i-- )
{
rolls[ ( int )( randomizer.nextDouble() * sides ) + 1 ]++;
}
}
private void showResults()
{
for( int i = 1; i <= sides; i++ )
{
StringBuffer sb = new StringBuffer();
sb.append( "Number " );
sb.append( i );
sb.append( " was rolled " );
sb.append( rolls[ i ] );
sb.append( " times (" );
sb.append( roundToDecimals( ( ( double ) rolls[ i ] / numberOfRolls ) * 100, 1 ) );
sb.append( "% of all rolls)" );
System.out.println( sb.toString() );
}
}
private double roundToDecimals( double value, int decimals )
{
double divisor = Math.pow( 10, decimals );
value *= divisor;
value = Math.round( value );
return value / divisor;
}
} |
|
|
|
qk
Joined: Oct 21, 2005
|
  Posted:
Jan 04, 2006 - 12:33 |
|
I think that people who doubt about the random generator wouldn't be happy with real dice anyway. They are far more unreliable! |
|
|
macike
Joined: Jun 25, 2005
|
  Posted:
Jan 04, 2006 - 13:22 |
|
Vicimus wrote: | The only thing I ever tried to prove is that the Java Random Number generator is not faulty and will not cheat you in a game on Fumbbl. I am having a lot of trouble understanding your what is you're even trying to disagree with and your logic to why you disagree.
The little bit about probability statistics is just general interest. It's not an attempt to prove anything about psuedo random numbers. It's just a bunch of facts (assuming my math is correct). |
Pseudorandomness is fine from the statistical (as they pass some statistical tests) point of view (when you collect the bunch of results and examine/analyze them) - macro view.
However 'bad' or 'good' streams are more likely to occur because they are not random (ie. determined by calculation) and have to balance each other. So pseudorandomness is not so fine from the probability of your next player action success point of view - micro view.
I think that Rynkky's idea of separate RNG for both teams is quite fine - everyone has its own bad/good streams.
As well as "one common" RNG shared for all FUMBBL games could be - everyone competes for others bad/good streams.
My point of view is that I can blame RNG for failed GFI because I'm helpless and I know that my fate is predetermined.
PS
If you don't understand anything, please do not say that it's partialy true. Ask for clarification first. |
_________________ Hold him, thrill him, kick him, kill him!!! |
|
|