12 coaches online • Server time: 03:57
Forum Chat
Log in
Recent Forum Topics goto Post TSC Draftgoto Post 4,000TV!goto Post IBA Draft League
SearchSearch 
Post new topic   Reply to topic
View previous topic Log in to check your private messages View next topic
Rusk



Joined: Dec 08, 2003

Post   Posted: Jun 01, 2005 - 13:38 Reply with quote Back to top

Rynkky wrote:
Want it via email? Might not be good idea to let it be in public as that program can be used for cheating as well..


Cheating? Noooo, Im sure knowing the results of the dice before they happen and planning after it isn't cheating Wink

Seriously, I only play about once a week, so I don't really need such a program. I also think it will cause me more frustration than joy, when triple 1 comes along and I dont have any rerolls left Smile

And if it works like you say, it will somehow take the fun out of winning Sad

To get back to the original post:
You were unlucky. Maybe all the 2+ results went into weather, number of fans turning out, armour rolls and dodges.
trouble



Joined: Nov 26, 2004

Post   Posted: Jun 01, 2005 - 13:40 Reply with quote Back to top

SideshowBob wrote:
Go for it is about a 4+. So 16 failures on 22 attempts isn't great, but not terrible either, since you make around one of four 4+-rolls.

Does that make sense?


Go-for-its are not 4+, they are 2+. It's still alot of failures. I think dice are more random than the computer randomizer. Not that I don't think the computer is good enough, but with the real dice each event really does not affect the others.
trouble



Joined: Nov 26, 2004

Post   Posted: Jun 01, 2005 - 13:45 Reply with quote Back to top

PhilMan wrote:
the random genorator doesn't try to average itself out, it is a poisson distribution, it has no memory, on average the score will be 3.5 yes, but the probobility of rolling 111111 is exactly the same as rolling 326155, the probobility of the next number being a 6 is exactly the same as the next number being a 1, no matter what has happened before.

I really hate people unable to understand what random really means...


I don't think that is the case. What people seem to have said before is that the number stream has a equal set of 6s,5s, 4s and suchlike. So if you rolled 111111 the odds of the next dice being a 1 are less because six ones have already been used. Its not much less, but it is less.
SubSonic



Joined: Aug 22, 2003

Post   Posted: Jun 01, 2005 - 13:57 Reply with quote Back to top

trouble wrote:

So if you rolled 111111 the odds of the next dice being a 1 are less because six ones have already been used. Its not much less, but it is less.


it just doesnt work that way...
Rynkky



Joined: Aug 03, 2004

Post   Posted: Jun 01, 2005 - 14:07 Reply with quote Back to top

SubSonic wrote:
trouble wrote:

So if you rolled 111111 the odds of the next dice being a 1 are less because six ones have already been used. Its not much less, but it is less.


it just doesnt work that way...


Explain me why? I'll explain you why I think you're wrong.

Lets assume that random number generator uses 32-bit seed. If that is the case, then the random number series will be 2^32 (4294967296) numbers long. Now, if you take those six ones out of those 4294967296, doesn't it mean that you'll have six ones less in the rest 4294967290 rolls? For me it does because random number generator can be perceived as a LIMITED pool of random numbers, from which you just pick the next available. With same seed the numbers and the order will always be same.


Last edited by Rynkky on %b %01, %2005 - %14:%Jun; edited 1 time in total
DonKosak



Joined: Apr 06, 2004

Post   Posted: Jun 01, 2005 - 14:11 Reply with quote Back to top

Allow me to quote a nice little post from one of the older threads on this subject, which pop up at completely random intervals Wink

BadMrMojo wrote:

Value of Random is calculated every single time a random roll is made... based upon the precise time at which your CPU cycles the function - which you have exactly NO way of knowing.

The simple fact that you asked implies that you're missing a fundamental bit of understanding about the whole process.

And no, the rest of the source code does not matter. Bear with me here.


Do you know algebra? Remember how you can plot ax^2 + bx + c and get a parabola?

Now think of the pseudo-random algorithm as a function like that... only way more complex and instead of making a nice, neat curve, it makes a huge squiggly mess all over your paper between 0 (including 0) and 1 (but less than 1).

The squiggly mess changes in ways that you can't really predict unless you have millions of points of reference. It's all over the place and it's really hard to follow unless you happen to have a really really wide view of things.

Now the squiggly mess joins at one point. After your number (x) gets up to 2^2048 (bill-yuns and bill-yuns in Sagan-ese) it attaches back to the exact point where it started, making a loop.

Now, If we go back to the parabola, you can put in a number for X and get a specific point on that curve? Each value for x will give us a slightly different point. Think of those points as being the Random Numbers that I mentioned before (>= 0 and < 1).

Now you can put any number from 1-2^2048 into the algorithm and get a distinct point. Sometimes those points might cross a few times - if you put in 3,146 you might end up with 0.561498. If you put in 16, you might end up with that exact same number. Probably not, however. Either way, your curve is going all over the place, so no matter what number you put in, you have no real way of predicting where it will be in that big squiggly mess (not unless you put in millions of those numbers in a row - remember the big picture comments above...?).

So, when you take an action that causes a die roll - making a 1 die block, for example - it goes something like this:

- The interface of JBB sends the call to innards of JBB saying "he just clicked block".

- The innards of JBB then says, "Ok, I need a random number so I can multiply it by six, add one and give the interface the result.

- The innards of JBB then says, "Ok, Java... gimme a random number."

- Java then looks to your system and says, "Ok, system, I'm platform-agnostic so I don't know how to check your current timestamp. Can you get one for me?"

- Your system, fortunately, has the JRE installed so it knows what Java is saying. It looks at the clock speed.

(By this point, it is important to note that some indeterminate amount of microseconds have passed. You don't know it, as the user, but all this stuff doesn't literally happen instantaneously. Each one goes through the pipeline as a process on your CPU - 21 registers if you're on a x86, I think. 7 on my G4. RISC rocks. The point of all this is that you don't know exactly at what microsecond your CPU gets around to getting the timestamp - even if you somehow could manage to time your button-pressing down the precision of a single microsecond. Make any sense?)

- So, your CPU gets the timestamp from the system clock. Ironically, by the time that your CPU gets it, more microseconds have passed and it's already out of date... hence the whole Heisenberg discussion.

- Your CPU says, "Hey Java. Here's your stupid timestamp. I had to take some time to redraw some silly icons and keep the spyware running first but it's close enough."

- Java says, "Thanks, CPU." and then it does its calculations and sends them back to the interface.

- The interface then calls an array which picks out the right block die result to go with the number from 1-6 and shows it to you.

- Naturally, it's a skull... so you reroll it

- The interface of JBB sends the call to innards of JBB saying "he just rerolled the block".

- etc...
xen7ric



Joined: Jan 13, 2005

Post   Posted: Jun 01, 2005 - 14:43 Reply with quote Back to top

What DonKosak quoted... Now why couldn't I find that thread... Knew it was there somewhere.

I just can't wait for someone to have the ultimately inevitable game where every die roll is a 1... Wink Course, by the time that happens in about 300 years at the current rate of play I'll be dead but it will be funny if I am there...

Thinking about it... Does that mean that my bad luck is all my CPUs fault.... My PC is NUFFLE? <gulp>
Rynkky



Joined: Aug 03, 2004

Post   Posted: Jun 01, 2005 - 14:43 Reply with quote Back to top

Quote:
Value of Random is calculated every single time a random roll is made... based upon the precise time at which your CPU cycles the function - which you have exactly NO way of knowing.


This is bullsh*t. Seed is given when the random number generator is created and from that point on clock is never used again (unless the generator is resetted of course).

Quote:
Now think of the pseudo-random algorithm as a function like that... only way more complex and instead of making a nice, neat curve, it makes a huge squiggly mess all over your paper between 0 (including 0) and 1 (but less than 1).


Not total bullsh*t but very unaccurate. The algorithm used by Java is hardly complex. Just matter of rolling bits, exclusive oring and dividing with "magic" numbers. Though really complex algorithms do exist!

Quote:
- The interface of JBB sends the call to innards of JBB saying "he just clicked block".

- The innards of JBB then says, "Ok, I need a random number so I can multiply it by six, add one and give the interface the result.

- The innards of JBB then says, "Ok, Java... gimme a random number."

- Java then looks to your system and says, "Ok, system, I'm platform-agnostic so I don't know how to check your current timestamp. Can you get one for me?"

- Your system, fortunately, has the JRE installed so it knows what Java is saying. It looks at the clock speed.


OMG .. He who wrote this clearly had a glue but he lost it. Sorry I fainted of laughing at this point. Let me introduce you Java's magnificent random routine. Can you see any access to clock there? Well, me neither.

Code:
synchronized protected int next(int bits)
{
long nextseed = (seed * multiplier + addend) & mask;
seed = nextseed;
return (int)(nextseed >>> (48 - bits));
}


So you can safely ignore all that guy said about CPU affecting your rolls .. lots of bullsh*t with faint of truth in between.
thesquig



Joined: Apr 11, 2004

Post   Posted: Jun 01, 2005 - 14:52 Reply with quote Back to top

Well TBH, its easier to understand that all that code you put up. Although, I have no idea when it comes to things like this. Smile

_________________
Nuffle Sucks!!!

Image
DonKosak



Joined: Apr 06, 2004

Post   Posted: Jun 01, 2005 - 15:04 Reply with quote Back to top

Well it seems that Rynkky knows a lot about Java and that BadMrMojo knows a lot about Java.
I know absolutely nothing about Java, so I'll just let you two sort it out.

/me tries to wake up BadMrMojo and grabs a bag of popcorn for the fight Wink

To be honest I don't care if the client is random, nearly random, pseudo random, ranting random or just evil. It's random enough for my entertainment. But I find it interesting, that people here can have such different views on this topic.
Rynkky



Joined: Aug 03, 2004

Post   Posted: Jun 01, 2005 - 15:12 Reply with quote Back to top

DonKosak wrote:
Well it seems that Rynkky knows a lot about Java and that BadMrMojo knows a lot about Java.
I know absolutely nothing about Java, so I'll just let you two sort it out.

/me tries to wake up BadMrMojo and grabs a bag of popcorn for the fight Wink

To be honest I don't care if the client is random, nearly random, pseudo random, ranting random or just evil. It's random enough for my entertainment. But I find it interesting, that people here can have such different views on this topic.


I am too eagerly waiting his response to my post. I really want to see him prove his words.
Shepherd



Joined: Oct 28, 2004

Post   Posted: Jun 01, 2005 - 15:19 Reply with quote Back to top

{ edit: said nasty things about someone. Totally unnecessary and removed now. - BMM }

_________________
A super-hero that always fails his Bonehead roll: MAN-MAN, the averagest hero alive!
Buy Dead Eyes Open, starting July 2005 from Slave Labor Graphics!
DonKosak



Joined: Apr 06, 2004

Post   Posted: Jun 01, 2005 - 15:24 Reply with quote Back to top

Hey Shepherd, are we in a bad mood or...? Shocked

Normally you seem friendly but now...
BadMrMojo



Joined: Aug 02, 2003

Post   Posted: Jun 01, 2005 - 15:29 Reply with quote Back to top

First of all, I don't know a lot about Java. I never claimed I did (do a search for IANAJD some time). This is taken a bit out of context, however. At the point at which this was written, people were not sharing educated insights into the inner details of pseudorandom number generation algorithms and effect of the abstraction layers involved in a virtual machine - instead, people were saying things like "I rolled double skulls twice in a row! It must be broken!"

What you are reading and judging so critically is an attempt by a layman to put things into *gasp* layman's terms.

Regarding my first "bullsh*t" point (checking the clock cycle each time), you may well be correct. I was always under the impression that calling a rand() function checked against the current clock cycle. I have yet to find any documentation explaining otherwise, so I was simply sharing information which I believed (and still believe) to be true. Either way, can we at least agree that the point stands and that your average, ordinary mortal cannot possibly predict what the outcome of any given random call is going to be with any sort of certainty? If so, why are we arguing over it?

The second "highly inaccurate" point (about graphing the algorithm) is very similar. I'm saying that the result is essentially unpredictable. You, on the other hand, say that it is not complex and is instead reliant upon "magic numbers". Either way, we're essentially just saying that you put a number into the function and you get a different number greater than 0 and less than or equal to 1, right? So why the vitriol? The point still stands.

Regarding my glue-sniffing routine (ie: JBB asks JVM to do this...), I'm glad you got a laugh out of it. It was intended to be funny. Perhaps that wasn't conveyed so well through text but nonetheless it was indeed a joke.

You seem to have missed the point behind the joke, however. Throwing in the code is completely irrelevant at this point. I was attempting (remember the context, layman's terms) to very roughly and humorously describe the basic concept of the JVM and, more importantly, point out that there's more going on than the user knows. Specifically, I was trying to point out that any action you take is a rather convoluted path which goes on inside what equates to a big magic box. The user generally just knows that they click on the block button and the appropriate number of dice come up. The point of that whole - rather silly, admittedly - excercise was that everything gets broken up into infinitessimal steps which ultimately end up being either 0 or 1. A yes or no question.

As mentioned above, if I am incorrect regarding the clock cycles, then that's fine. It is inaccurate. It still stands to point out that the way in which someone's actions in the game are interpreted and implemented is ultimately beyond their understanding (and mine, as demonstrated by my possible inaccuracies) and, as such, unpredictable and "random enough."

So, rather than nitpicking the details of my "total bullsh*t" and glossing over the actual points being made, have you anything to add?

_________________
Ta-Ouch! of BloodBowl
Condensed Guide for Newbies


Last edited by BadMrMojo on %b %01, %2005 - %16:%Jun; edited 1 time in total
DonKosak



Joined: Apr 06, 2004

Post   Posted: Jun 01, 2005 - 15:33 Reply with quote Back to top

Glad to see the pimp back in his corner. I just have a craving for my daily dosage or I'll go mad and...hmmm....write a post about fouling or something... Smile
Display posts from previous:     
 Jump to:   
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Log in to check your private messages View next topic