UPDATE: Dice roller questions (now fixed!)

Suggestions or feature requests for the dice roller, forums, or PbP games.
Message
Author
User avatar
ToniXX
Site Admin
Site Admin
Posts: 3259
Joined: Sat Sep 19, 2009 5:21 pm
Location: Long Beach, CA

UPDATE: Dice roller questions (now fixed!)

#1 Post by ToniXX »

Our new member Xaxyx believes that he has found a problem with the dice roller, saying that the results are not truly random. I've examined my code over and over and have come to the conclusion that if he is correct, the problem lies with the way the randomize feature works with the language that I used to write the site, and when generating a string of random numbers (as with a stats roll), certain patterns may arise, as the randomize function uses the system clock to generate a 'seed' number. This is something that may be rectified if I re-work some code, but right now, unfortunately, I do not have that kind of time. He has suggested that I take the dice roller down entirely. Well, I'm not going to do that, but I'm posting to let you know this and to use the roller at your own discretion. There are other dice rollers out there, or you could just roll your own dice and post your results. The decision is yours, of course, but up until now I hadn't seen anyone having any issues with the numbers generated.

I didn't post this thread to start a flame war or get more of you involved with this controversy, I just felt that you all should know this.
"Sir, our research shows that the bird is equal to or greater than the word."
The sab-cat has nine lives and no conscience
User avatar
Alethan
POWAH!
POWAH!
Posts: 14363
Joined: Thu Oct 21, 2010 6:50 pm
Location: Midwest
Contact:

Re: Dice roller questions

#2 Post by Alethan »

What would be your ETA for a patch, ToniXX?
Dragon foot. Bamboo pole. Little mouse. Tiny boy.
User avatar
rredmond
Rider of Rohan
Rider of Rohan
Posts: 8808
Joined: Sat Jun 12, 2010 4:46 pm
Location: South Jersey

Re: Dice roller questions

#3 Post by rredmond »

Intrigued to find out how he figured that out! Wow.

Good luck ToniXX.
This is a game about killing things and taking their stuff so you can become more powerful in order to kill bigger things and take even better stuff.
Alethan: I'm good with NOT pressing our luck this time.
mjulius: That's how I know I'm home.
Pulpatoon: The whole point of PbP is to take the scheduling pressure off the game. We're just chatty because we're so eager!
Scott308: ...everyone should be reminded of just how wonderful the people they play games with here can be in real life.
Leitz: Quality and quantity wise, I think US is the best I've seen.
Paladin: I can promise terror, glory, and riches...or a quick and brutal death.
Inferno: Come on! That's was Vicar's Head, a completely different doomed village!
Rex: I can move to the wait list to let someone else into the game.
User avatar
dmw71
POWAH!
POWAH!
Posts: 20270
Joined: Tue Jan 24, 2012 7:18 pm
Location: Chicago, Illinois
Contact:

Re: Dice roller questions

#4 Post by dmw71 »

ToniXX wrote:Our new member Xaxyx believes that he has found a problem with the dice roller, saying that the results are not truly random.
Wow. Heck of a find if Xaxyx is right. I'd be interested in knowing what led him to his suspicions.
I've examined my code over and over and have come to the conclusion that if he is correct, the problem lies with the way the randomize feature works with the language that I used to write the site
I've read that, from a computer programming perspective, trying to code for random numbers is not simple. What language are you using, if you don't mind me asking. While not a programmer, per se, I have dabbled with it a little bit and might be willing to examine and test the algorithm you're using. I'd also be willing to help research for answers.
and when generating a string of random numbers (as with a stats roll), certain patterns may arise, as the randomize function uses the system clock to generate a 'seed' number.
I do like your die rolling tool. I suspect, after reading this, that the problem stems from trying to generate multiple random numbers at the same time (e.g. ability score generation). Would a simple solution, at least for the time being, be to simply roll one die at a time? It would be more inefficient, but it would still allow rolls to be tracked.
This is something that may be rectified if I re-work some code, but right now, unfortunately, I do not have that kind of time.
Again, I would be more than willing to help in any way I can (research, a second set of eyes, etc...)
He has suggested that I take the dice roller down entirely. Well, I'm not going to do that, but I'm posting to let you know this and to use the roller at your own discretion.
I agree with keeping the roller up. It would be different if this discovery were found in a business critical application, but this is for a game. Not a huge deal... yet, my opinion is that it should eventually be addressed.

Edited to correct spelling (toll -> tool).
Last edited by dmw71 on Thu Mar 29, 2012 6:16 pm, edited 1 time in total.

-- Games --
- DM: In Development

-- 2025 --
Unseen Servant Con!
.
.
-- Project --
Playtest: Untitled Project (1e)
(Status: Archived)

User avatar
ToniXX
Site Admin
Site Admin
Posts: 3259
Joined: Sat Sep 19, 2009 5:21 pm
Location: Long Beach, CA

Re: Dice roller questions

#5 Post by ToniXX »

dmw71 wrote:I do like your die rolling toll. I suspect, after reading this, that the problem stems from trying to generate multiple random numbers at the same time (e.g. ability score generation). Would a simple solution, at least for the time being, be to simply roll one die at a time? It would be more inefficient, but it would still allow rolls to be tracked.
That's a solution that I would say go with, but I think Xaxyx will have a problem with that as well. :?
"Sir, our research shows that the bird is equal to or greater than the word."
The sab-cat has nine lives and no conscience
User avatar
Alethan
POWAH!
POWAH!
Posts: 14363
Joined: Thu Oct 21, 2010 6:50 pm
Location: Midwest
Contact:

Re: Dice roller questions

#6 Post by Alethan »

If nobody had said anything, I wouldn't have known it wasn't working.

As long as EVERYONE uses the same dice roller, can we then assume nobody receives a benefit or detriment over anyone else?

Or... am I reading this right?
ToniXX wrote:...the randomize function uses the system clock to generate a 'seed' number.
Does the exact time of day you post make a difference in your rolls? If so, what's the best time to post? ;)
Dragon foot. Bamboo pole. Little mouse. Tiny boy.
Xaxyx
Pathfinder
Pathfinder
Posts: 467
Joined: Tue Mar 20, 2012 9:27 pm

Re: Dice roller questions

#7 Post by Xaxyx »

Thanks, ToniXX, for opening this topic to discussion.

I am now absolutely certain that the dice roller yields non-random, patterned results for every individual die roll beyond the first for any roll attempt. I have immense amounts of simple, demonstrably conclusive evidence in support of this finding. This evidence is also readily reproducible, by anyone, simply by cranking up the roller and trying it one's self. In my next reply, you may review some sample data sets that I've generated and provided to ToniXX over the course of my research.

Let me clarify again: after the first die roll of any roll attempt, further die rolls are corrupt. This means that even an algorithm as simple as [3d6] is invalid, as only the first 1d6 is random; the subsequent two dice are patterned off of it. Rolling [10d2], my "series of coin flips", readily demonstrates this principle. Again, I invite you all to try it yourselves.

Now that the science is out of the way: my own, personal opinion is that we absolutely, positively should not use the roller in its current state for any purpose. It should be taken offline immediately, and a substitute be leveraged in its stead until the issue is resolved. This is for several reasons:

1) Loaded dice are silly. Do you really want to roll loaded dice? I absolutely do not and will not. ToniXX has already suggested that if I so choose, I can use a different roller. I will be doing so.

2) Further, I would be extraordinarily uncomfortable with the notion that my fellow players are using the corrupt roller. Remember: these rolls are not random; they are patterned. Surely at least some of you have noticed some of the absolutely bizarre stats rolls players have been generating. For example, in ToniXX's campaign, I rolled, on what was supposed to be [4d6c1]x6: 17 17 16 15 13 16. These are crazily high numbers. What's more is that three other players generated exactly the same set of numbers. In exactly the same order. Two were even generated right in a row.

3) This patterned die "roller" can be exploited, if you understand enough about the pattern. Not so much that specific numbers can be generated on purpose, since the pattern's start position is indeed a random number. But enough so that players who need a nice, even distribution of numbers would benefit. Let's say that in a given round, I get two attacks, don't care too much if I hit with both, but really, really need to hit with at least one. It would therefore behoove me to roll [1d20][1d20] on this roller, since I know that the two numbers will be a particular distance from one another, and therefore will make it more likely that one will be in my hit range. I could do the same for damage: if I hit twice, and really need at least one to be a decent damage roll, I'm far better off, probability-wise, to roll [1d8][1d8] on the pattern than rolling each one by itself.

I know that I'm new here. But I cannot stress enough how great a problem I feel this to be with the integrity of the games on this site. This environment is wonderful, the players are friendly. ToniXX is clearly very understanding, very patient, and has done a great deal of excellent work to make this site a comfortable and enjoyable location for role play. But until it's fixed, the roller must come down.
Xaxyx
Pathfinder
Pathfinder
Posts: 467
Joined: Tue Mar 20, 2012 9:27 pm

Re: Dice roller questions

#8 Post by Xaxyx »

Here are sample sets that I mailed to ToniXX. No tricks here; no cherry-picking; just straight data. Again, try any of these algorithms yourself, and draw your own conclusions.

----------

1) Here's just [10d2], rolled over and over again:

11, 14, 14, 10, 19, 12, 11, 18, 15, 15, 15, 10, 18, 10, 17, 15, 20, 10, 20, 14, 15, 10, 19, 11, 16, 12, 10, 17, 19, 11, 20, 20, 20, 11, 10, 16

Seem all right at first glance? 1d2 is a coin flip. 10d2 is ten coin flips. To roll a 20 on 10d2 means to flip heads on a coin ten times in a row. To manage that, the odds are 1 in 1024. The odds of rolling a 10 -- that's ten tails in a row -- is similarly 1 in 1024. Yet in the above 36 attempts, I managed to roll either 10 or 20 twelve times -- 33% of the time! Of the remainder, 11 or 19 -- results of comparable supposed rarity -- showed up eight times.

----------

2) Stat generator history entries:

3/14/2012 10:06:26 AM, Emmett, Sinister Shroom:
Stats: STR:17, INT:17, WIS:16, DEX:15, CON:13, CHR:16

3/16/2012 2:07:41 PM, Ihsahn, Sinister Shroom:
Stats: DEX:17, INT:17, WIS:16, STR:15, CON:13, CHR:16

3/19/2012 1:25:23 AM, Zafalia Sojafa, Sinister Shroom:
Stats: WIS:17, DEX:17, INT:16, CHR:15, STR:13, CON:16

That was the *very next stats roll* made that day, with *exactly* the same stats, in *exactly* the same order.

Two stats rolls later:
3/23/2012 10:33:35 AM, Veneficus, Incursion into Newiron:
Stats: STR:17, DEX:17, CON:16, CHR:15, WIS:13, INT:16

Again, the same exact stats, in exactly the same order.

----------

3) Using [3d6][3d6][3d6][3d6][3d6][3d6]:

07 05 18 08 05 18 -- Two 18's
05 03 16 06 03 16 -- Two 3's
03 18 14 05 18 15 -- Two 18's and 3
18 17 13 04 17 14 -- 18/17/17 and a 4
14 13 09 16 13 10 -- Average Joe

With rolls like these I should be playing the lottery. ;) Really, really wild results here.

----------

4) Using [1d100][1d100][1d100][1d100][1d100][1d100], I generated several sets of numbers. Then I took those sets and sorted them by the first number in each set. Here are the results, along with the steps between each number in the series:

02 93 71 11 92 75: -9, -22, -60, -19, -17
06 97 75 15 96 78: -9, -22, -60, -19, -18
15 07 85 24 06 88: -8, -22, -61, -18, -18
21 12 90 30 11 93: -9, -22, -60, -19, -18
30 22 00 40 21 03: -8, -22, -60, -19, -18
41 33 11 51 32 14: -8, -22, -60, -19, -18
42 34 12 52 33 15: -8, -22, -60, -19, -18
44 35 13 53 34 17: -9, -22, -60, -19, -17
50 41 19 59 40 23: -9, -22, -60, -19, -17
52 44 22 62 43 25: -8, -22, -60, -19, -18
53 45 23 63 44 26: -8, -22, -60, -19, -18
65 57 35 75 56 38: -8, -22, -60, -19, -18
85 76 54 94 75 57: -9, -22, -60, -19, -17
86 78 56 95 77 59: -8, -22, -60, -18, -18
89 80 58 98 79 62: -9, -22, -60, -19, -17
96 88 66 06 87 69: -8, -22, -60, -19, -18

In other words, the second number is always 8 or 9 less than the first number; the third number is always 22 less than the second number; and so forth.
Last edited by Xaxyx on Thu Mar 29, 2012 6:18 pm, edited 1 time in total.
Xaxyx
Pathfinder
Pathfinder
Posts: 467
Joined: Tue Mar 20, 2012 9:27 pm

Re: Dice roller questions

#9 Post by Xaxyx »

Alethan wrote:
ToniXX wrote:...the randomize function uses the system clock to generate a 'seed' number.
Does the exact time of day you post make a difference in your rolls? If so, what's the best time to post? ;)
Time of day makes no difference. The seed is being correctly applied to the first individual die roll. Every die roll after that is based off of a fixed pattern, independent of any other factors or variables.
User avatar
Alethan
POWAH!
POWAH!
Posts: 14363
Joined: Thu Oct 21, 2010 6:50 pm
Location: Midwest
Contact:

Re: Dice roller questions

#10 Post by Alethan »

So what random dice roller with similar functionality (i.e. the ability to link to rolls) are you going to use/would you recommend?
Dragon foot. Bamboo pole. Little mouse. Tiny boy.
User avatar
rredmond
Rider of Rohan
Rider of Rohan
Posts: 8808
Joined: Sat Jun 12, 2010 4:46 pm
Location: South Jersey

Re: Dice roller questions

#11 Post by rredmond »

I wonder if it's the same for macros. I'm guessing it is.
But the first top is always random?
This is a game about killing things and taking their stuff so you can become more powerful in order to kill bigger things and take even better stuff.
Alethan: I'm good with NOT pressing our luck this time.
mjulius: That's how I know I'm home.
Pulpatoon: The whole point of PbP is to take the scheduling pressure off the game. We're just chatty because we're so eager!
Scott308: ...everyone should be reminded of just how wonderful the people they play games with here can be in real life.
Leitz: Quality and quantity wise, I think US is the best I've seen.
Paladin: I can promise terror, glory, and riches...or a quick and brutal death.
Inferno: Come on! That's was Vicar's Head, a completely different doomed village!
Rex: I can move to the wait list to let someone else into the game.
User avatar
dmw71
POWAH!
POWAH!
Posts: 20270
Joined: Tue Jan 24, 2012 7:18 pm
Location: Chicago, Illinois
Contact:

Re: Dice roller questions

#12 Post by dmw71 »

rredmond wrote:I wonder if it's the same for macros. I'm guessing it is.
But the first top is always random?
Almost certainly. As I suspected based off what ToniXX originally posted, and as Xaxyx later confirmed (below), any roll that involves multiple dice is affected.
Xaxyx wrote:Let me clarify again: after the first die roll of any roll attempt, further die rolls are corrupt. This means that even an algorithm as simple as [3d6] is invalid, as only the first 1d6 is random; the subsequent two dice are patterned off of it.
A single attack roll (e.g. 1d20) or damage roll (that doesn't involve rolling two dice) (e.g. 1-8) should be fine. However, any time a second die is entered into the equation (e.g. 2d4), the rolls get mucked up.

For new player creation, instead of using the macro [4d6c1], you would need to roll [1d6] and record the result. Roll [1d6] a second time and record the result. Roll [1d6] a third time and record the result. Roll [1d6] a fourth time and record the result. The lowest roll would need to be eliminated and the remaining three rolls added together manually.

At least that is my understanding.

Inefficient, yes. It will still allow for rolls to be recorded and a history of rolls kept within a campaign for reference, though.

-- Games --
- DM: In Development

-- 2025 --
Unseen Servant Con!
.
.
-- Project --
Playtest: Untitled Project (1e)
(Status: Archived)

Xaxyx
Pathfinder
Pathfinder
Posts: 467
Joined: Tue Mar 20, 2012 9:27 pm

Re: Dice roller questions

#13 Post by Xaxyx »

Alethan wrote:So what random dice roller with similar functionality (i.e. the ability to link to rolls) are you going to use/would you recommend?
Invisible Castle is a name I've heard kicked around the PbP sites. It seems sufficiently robust, though of course their syntax is quite different and will require re-learning. Here's their equivalent of [4d6c1]x6, with the following parameters:

Name: Testy McTester
Rolls: 6
Dice: 4d6.takeHighest(3)

http://invisiblecastle.com/roller/view/3438272/
User avatar
Alethan
POWAH!
POWAH!
Posts: 14363
Joined: Thu Oct 21, 2010 6:50 pm
Location: Midwest
Contact:

Re: Dice roller questions

#14 Post by Alethan »

Well... if we're going to use a different dice roller, I suggest we all use the same dice roller. Or, at the very least, GMs of their particular games should indicate if they require participants to use a dice roller where rolls can be linked in-thread.

I'm trying to set up an account on Invisible Castle to do some testing with it, but so far I've yet to receive the confirmation e-mail I need in order to activate my account.

I'll post my thoughts as soon as I'm able to play around with it a bit.

Al
Dragon foot. Bamboo pole. Little mouse. Tiny boy.
User avatar
Argennian
Rider of Rohan
Rider of Rohan
Posts: 4885
Joined: Mon Jun 14, 2010 7:12 am
Location: Bay Area, NorCal

Re: Dice roller questions

#15 Post by Argennian »

Now that this has come to light, I might've experienced this condition in a few previous instances like different characters/similar roll results maybe?

But regardless, now that the issue has been documented, I'm confident ToniXX will get it addressed as soon as he's able. If we can figure out a way to work around it, lets do so. If we can't, we could just use another roller in the interim. I'll 2nd the recommendation of http://www.invisiblecastle.com I make rolls for all my other pbp characters over there and it should work well enough. (Just be sure to remember/document what you entered for Campaign Name and Character Name, so you can track all your character's rolls on the same page!)


As far as going back and trying to retcon anything, I really don't see it being necessary. If non-random numbers were rolled, everyone was rolling them. The fact that no one was apparently aware of this, let alone tried to manipulate it in their favor, is good enough a reason for me.


Cheers,

Mitch
Yosef Travathas: High Elf Fighter4/Magic-User3 (rredmond's Pacesetter Games "Legacy of the Unknown" OSRIC Playtest)
Brok Sterling: Human Assassin3 (ToniXX's Incursion into Newiron OSRIC Playtest)
Tanik Tremwoodak: Dwarf Cleric3 (Dave's 1e Skype Game)

DM: home-brew OSRIC "A New Hope to the West" campaign

Fireball... good!!

"What's it gonna take?"
"Everything."
tkrexx as Emm the Avenging Druid wrote:I shall burn you, and I shall sink your petty warship with fire and lightning, and the ocean shall swallow it and all aboard, and no one will remember any of you!
User avatar
Alethan
POWAH!
POWAH!
Posts: 14363
Joined: Thu Oct 21, 2010 6:50 pm
Location: Midwest
Contact:

Re: Dice roller questions

#16 Post by Alethan »

Alethan wrote:Well... if we're going to use a different dice roller, I suggest we all use the same dice roller. Or, at the very least, GMs of their particular games should indicate if they require participants to use a dice roller where rolls can be linked in-thread.

I'm trying to set up an account on Invisible Castle to do some testing with it, but so far I've yet to receive the confirmation e-mail I need in order to activate my account.

I'll post my thoughts as soon as I'm able to play around with it a bit.

Al
Well, apparently Invisible Castle isn't all that robust at first glance. Not having an account already, I tried to get one set up yesterday. I've yet to receive the required confirmation e-mail I need to complete the process. Tried to communicate using some of the Contact Us tools on the IC site and I get an error message every time.

I'll continue using the US dice roller (one dice roll at a time, I guess) until either IC is fixed or someone has something better to use. I tested out many dice rollers last night, but none of the ones I found allowed you to save and link to dice rolls, so they were fairly useless.
Dragon foot. Bamboo pole. Little mouse. Tiny boy.
Xaxyx
Pathfinder
Pathfinder
Posts: 467
Joined: Tue Mar 20, 2012 9:27 pm

Re: Dice roller questions

#17 Post by Xaxyx »

http://www.metstübchen.de/cgi-bin/DIESERVER/roll.pl

Das Metstübchen Die Roller

(Apparently, the [URL] tag won't work with the character "ü" in the address...)

Pretty versatile, stores results by campaign (the field is labeled "code"), no registration required. You can search results by campaign (but not by character name) by entering in a particular campaign code and hitting Search. For example, search for campaign code "XYZ" to see my test results. You can't link to individual rolls, though.

In the meantime, I'm going to email Invisible Castle and see why the registration process is borked.

EDIT: Attempting to submit a message to Invisible Castle via their "Contact Us" link caused a server error. Robust, indeed.
User avatar
Alethan
POWAH!
POWAH!
Posts: 14363
Joined: Thu Oct 21, 2010 6:50 pm
Location: Midwest
Contact:

Re: Dice roller questions

#18 Post by Alethan »

Xaxyx wrote:
EDIT: Attempting to submit a message to Invisible Castle via their "Contact Us" link caused a server error. Robust, indeed.
Yep, that was my result, as well. I'm hoping they at least notice the server errors and look into it.
Dragon foot. Bamboo pole. Little mouse. Tiny boy.
User avatar
dmw71
POWAH!
POWAH!
Posts: 20270
Joined: Tue Jan 24, 2012 7:18 pm
Location: Chicago, Illinois
Contact:

Re: Dice roller questions

#19 Post by dmw71 »

How can we be sure that any online die roller application won't be affected by this same issue?

I don't know what language ToniXX used to code the die rolling website, but according to his original post "the problem lies with the way the randomize feature works with the language that I used to write the site."

Will every website that uses the built-in randomize methods of a particular language be victim to this same situation?

I really don't want to go through the hassle of learning the semantics of a new website only to find that it, too, is unreliable. If it can be proven that a different website is unaffected, I will be willing to switch on a temporary basis (until the glitch with the Unseen Servant die roller has been fixed), but my ultimate intention is to remain with Unseen Servant. If that means rolling one die at a time, so be it. For the most part, this will present the biggest challenge during initial player creation where, instead of rolling four six-sided dice at the same time, you'll have to make four individual d6 rolls per ability.

Just my two cents.

-- Games --
- DM: In Development

-- 2025 --
Unseen Servant Con!
.
.
-- Project --
Playtest: Untitled Project (1e)
(Status: Archived)

User avatar
dmw71
POWAH!
POWAH!
Posts: 20270
Joined: Tue Jan 24, 2012 7:18 pm
Location: Chicago, Illinois
Contact:

Re: Dice roller questions

#20 Post by dmw71 »

Alethan wrote:Well, apparently Invisible Castle isn't all that robust at first glance. Not having an account already, I tried to get one set up yesterday. I've yet to receive the required confirmation e-mail I need to complete the process. Tried to communicate using some of the Contact Us tools on the IC site and I get an error message every time.
I just confirmed that I do have an account already established with Invisible Castle from before I found this website. I never did use it, but I will try to play around with it a bit today and over the weekend.

My primary objective will be to roll up a large sampling of characters and see how the 4d6c1 results look and if there are any unusual patterns that emerge.

If anyone has any other regression testing examples or situations they'd like to to use, feel free to let me know.

- Dave

-- Games --
- DM: In Development

-- 2025 --
Unseen Servant Con!
.
.
-- Project --
Playtest: Untitled Project (1e)
(Status: Archived)

Locked

Return to “Suggestions”