Page 3 of 3
Re: UPDATE: Dice roller questions (possibly now fixed)
Posted: Tue Apr 24, 2012 6:18 pm
by Xaxyx
I'm sorry, ToniXX, but I really don't think it's fixed.
Here's [10d2] again:
13, 11, 12, 18, 19, 13, 13, 13, 12, 12, 13, 18, 20, 19, 16, 20, 10, 14, 11, 15
Two 20's, two 19's, two 11's and a 10 in just twenty attempts. That's extreme. The odds of flipping a coin the same in a row ten times are one in 512. Here, it happened three times in twenty attempts.
If that's not enough to convince you, here's the very next roll I tried, using [100d2]. That's one hundred coin flips in a row:
200
This is the same problem, I presume, wherein the latter rolls are based somehow on the seed of the first.
Re: UPDATE: Dice roller questions (possibly now fixed)
Posted: Tue Apr 24, 2012 7:29 pm
by ToniXX
I see your point here. Something I did when parsing the macro syntax was this: When considering a roll of 10d2 (just for this example), the system doesn't roll a d2 ten times then sum the results, it generates a number one time that is between 10 and 20. That's why you're coming up with statistically improbable results. Now, I realize that's not the best way of doing it, but that's how it works and I feel that it will be fine for 90-95% of all RPG rolling, especially for older editions of D&D. (I only say older editions as I know nothing of editions beyond 2ed). Who's going to be rolling 10d2 in a campaign? (I'm sure someone will come up with a situation in where it could happen.)
Anyway, this can be fixed, but it's going to generate much more overhead, especially since now all random number generation is done at random.org. I'm going to work on this and see if I can reduce the overhead. The easiest way would be to limit the number of dice rolled to no more than 10 (10d2 would be the limit. 100d2 would error (or just be cut back to 10)). This is just an idea at this point.
On the other hand, if the expression is 4d6c1 (roll 4d6, cut the lowest one), then each die is rolled individually, the results are sorted, and the lowest result is dropped. In this case, you will now NOT see the patterns from rolling multiple 4d6c1 in the same roll.
Re: UPDATE: Dice roller questions (possibly now fixed)
Posted: Tue Apr 24, 2012 7:38 pm
by ToniXX
Try it again with a series of 10d2 and see what you get. I've limited the number of dice per expression to 10 just to 'fix' it quickly.
Re: UPDATE: Dice roller questions (possibly now fixed)
Posted: Tue Apr 24, 2012 7:50 pm
by Xaxyx
Could you elaborate on why overhead is such a concern? It's not as if we'll be rolling dice all day long. I've seen the roller go for days without being touched.
Anyway, [10d2] seems to be functioning correctly now, insofar as that the results seem to fall within a statistical norm at first glance. The same seems to be the case with [4d6c1]x6. All of the old patterns seem to have disappeared, and I don't see any new ones yet.
I'll be testing the heck out of it tonight, but so far, I'm getting a good feeling.
Re: UPDATE: Dice roller questions (possibly now fixed)
Posted: Tue Apr 24, 2012 7:51 pm
by dmw71
ToniXX wrote:Good stuff, Dave. I don't know why the results are not summed... Looking into that now.
** edit ** easy fix... should be working now.
Confirmed. Although, now I miss being able to see what the individual die results were.
A few more quick characters:
Rolls in order --> Rolls sorted in ascending order <-- (Max-Min)
14 17 15 15 10 08 --> 08 10 14 15 15 17 <--17-08 = 09
12 07 09 11 10 11 --> 07 09 10 11 11 12 <--12-07 = 05
11 13 15 10 10 11 --> 10 10 11 11 13 15 <--15-10 = 05
14 10 15 14 18 08 --> 08 10 14 14 15 18 <--18-08 = 10
08 10 11 11 11 10 --> 08 10 10 11 11 11 <--11-08 = 03
12 15 08 13 10 09 --> 08 09 10 12 13 15 <--15-08 = 07
Some of the above roll sets feel funny to me. It almost seems that if your rolls start off average, you never escape average. Maybe, since average rolls are expected, this isn't an issue, but it just seemed a bit odd that certain sets had rolls where the maximum roll and the minimum roll were within three or five of each other.
Roll links:
I also wanted to try some macros that rolled multiple ability scores at the same time:
[4d6c1] = 6 [4d6c1] = 7 [4d6c1] = 9: 09-06 = 03 <--
[4d6c1] = 13 [4d6c1] = 15 [4d6c1] = 12: 15-12 = 03 <--
[4d6c1] = 12 [4d6c1] = 14 [4d6c1] = 8: 14-08 = 06
[4d6c1] = 14 [4d6c1] = 10 [4d6c1] = 12: 14-10 = 04 <--
[4d6c1] = 16 [4d6c1] = 12 [4d6c1] = 14: 16-12 = 04 <--
[4d6c1] = 12 [4d6c1] = 17 [4d6c1] = 13: 17-12 = 05
[4d6c1] = 14 [4d6c1] = 9 [4d6c1] = 12: 14-09 = 05
[4d6c1] = 12 [4d6c1] = 15 [4d6c1] = 12: 15-12 = 03 <--
[4d6c1] = 16 [4d6c1] = 10 [4d6c1] = 13: 16-10 = 06
[4d6c1] = 15 [4d6c1] = 16 [4d6c1] = 16: 16-15 = 01 <--
[4d6c1] = 16 [4d6c1] = 12 [4d6c1] = 12: 16-12 = 04 <--
[4d6c1] = 15 [4d6c1] = 14 [4d6c1] = 13: 15-13 = 02 <--
[4d6c1] = 16 [4d6c1] = 17 [4d6c1] = 9: 17-09 = 08
[4d6c1] = 11 [4d6c1] = 10 [4d6c1] = 13: 13-10 = 03 <--
[4d6c1] = 9 [4d6c1] = 10 [4d6c1] = 14: 14-09 = 05
[4d6c1] = 14 [4d6c1] = 11 [4d6c1] = 14: 14-11: 03 <--
[4d6c1] = 14 [4d6c1] = 13 [4d6c1] = 11: 14-11: 03 <--
[4d6c1] = 15 [4d6c1] = 11 [4d6c1] = 13: 15-11: 04 <--
[4d6c1] = 10 [4d6c1] = 13 [4d6c1] = 9: 13-09: 04 <--
[4d6c1] = 10 [4d6c1] = 14 [4d6c1] = 16: 16-10 = 06
Maybe this is by design in the code itself, but it seems when rolling three ability scores together at the same time, a majority of the rolls are within three or four of each other, with there being only four instances where the difference is six or greater.
I believe the die roller is definitely better, but I'm thinking there may still be some glitches that might need to be addressed.
- Dave
Re: UPDATE: Dice roller questions (possibly now fixed)
Posted: Tue Apr 24, 2012 8:02 pm
by Xaxyx
dmw71 wrote:Maybe this is by design in the code itself, but it seems when rolling three ability scores together at the same time, a majority of the rolls are within three or four of each other, with there being only four instances where the difference is six or greater.
I would purport that this is by design of the dice.

[4d6c1] will yield a result between 10 and 15 about 70% of the time. As it's highly likely for results to fall in this range, then it's similarly highly likely for results to be close to one another -- within three or four, as you've aptly observed.
Re: UPDATE: Dice roller questions (possibly now fixed)
Posted: Tue Apr 24, 2012 8:07 pm
by dmw71
Xaxyx wrote:dmw71 wrote:Maybe this is by design in the code itself, but it seems when rolling three ability scores together at the same time, a majority of the rolls are within three or four of each other, with there being only four instances where the difference is six or greater.
I would purport that this is by design of the dice.

[4d6c1] will yield a result between 10 and 15 about 70% of the time. As it's highly likely for results to fall in this range, then it's similarly highly likely for results to be close to one another -- within three or four, as you've aptly observed.
That makes perfect sense (which is why I'll leave the mathematical interpretation of results up to those who know infinitely more than I do).

Re: UPDATE: Dice roller questions (possibly now fixed)
Posted: Tue Apr 24, 2012 8:20 pm
by ToniXX
Xaxyx wrote:Could you elaborate on why overhead is such a concern? It's not as if we'll be rolling dice all day long. I've seen the roller go for days without being touched.
Overhead is a concern because for each random number requested (i.e.: each die in a die expression), a request is sent to random.org (in Ireland). Now, their API has a method where you can request multiple random results in a single request (currently, I just request one in return, as this fits well into how I was doing it before). Using this feature means more time rewriting code. Now, as you say, once we're beyond the testing stage, the overhead will be minimal. Thus, I may not rewrite to compensate for this, so for now I'm just limiting the die count to 10 or less.
And you answered Dave's concern, which I was also going to address.
Re: UPDATE: Dice roller questions (possibly now fixed)
Posted: Wed Apr 25, 2012 12:48 pm
by rredmond
Thanks to all three of you!
I'm just a old country social worker not a math-guy!
Thanks again.
Re: UPDATE: Dice roller questions (possibly now fixed)
Posted: Wed Apr 25, 2012 2:02 pm
by Norjax
This is great news. I prefer the Unseen Servant dice roller over the others presented in this thread.
Re: UPDATE: Dice roller questions (possibly now fixed)
Posted: Wed Apr 25, 2012 4:05 pm
by Argennian
Norjax wrote:This is great news. I prefer the Unseen Servant dice roller over the others presented in this thread.
+1 Another Big Thanks to ToniXX for all that he does here!!

Re: UPDATE: Dice roller questions (possibly now fixed)
Posted: Mon Apr 30, 2012 9:08 pm
by ToniXX
So I just want to confirm that we are all in agreement that the dice roller is working well. I'm basically looking at you, Xaxyx
Thanks
Re: UPDATE: Dice roller questions (possibly now fixed)
Posted: Mon Apr 30, 2012 9:28 pm
by Xaxyx
Yes, I'm quite satisfied now that the rolls are reflecting genuine randomness. Thanks again for addressing this.
Re: UPDATE: Dice roller questions (possibly now fixed)
Posted: Fri May 04, 2012 2:21 pm
by Alethan
Thank you, ToniXX for all of your hard work on getting the dice roller squared away!
Now let's all work on putting it to good use!