The following warnings occurred:
Warning [2] Undefined variable $awaitingusers - Line: 33 - File: global.php(816) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(816) : eval()'d code 33 errorHandler->error
/global.php 816 eval
/showthread.php 24 require_once
Warning [2] Undefined array key "style" - Line: 874 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 874 errorHandler->error
/showthread.php 24 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5014 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5014 errorHandler->error
/global.php 874 build_theme_select
/showthread.php 24 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 6953 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 6953 errorHandler->error
/inc/functions.php 5041 is_member
/global.php 874 build_theme_select
/showthread.php 24 require_once
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 642 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 642 errorHandler->error
/showthread.php 1063 build_postbit
Warning [2] Undefined array key "showimages" - Line: 700 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 700 errorHandler->error
/showthread.php 1063 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 705 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 705 errorHandler->error
/showthread.php 1063 build_postbit
Warning [2] Undefined array key "useravatar" - Line: 6 - File: inc/functions_post.php(803) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php(803) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 803 eval
/showthread.php 1063 build_postbit
Warning [2] Undefined array key "userstars" - Line: 11 - File: inc/functions_post.php(803) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php(803) : eval()'d code 11 errorHandler->error
/inc/functions_post.php 803 eval
/showthread.php 1063 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 642 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 642 errorHandler->error
/showthread.php 1063 build_postbit
Warning [2] Undefined array key "showimages" - Line: 700 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 700 errorHandler->error
/showthread.php 1063 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 705 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 705 errorHandler->error
/showthread.php 1063 build_postbit
Warning [2] Undefined array key "useravatar" - Line: 6 - File: inc/functions_post.php(803) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php(803) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 803 eval
/showthread.php 1063 build_postbit
Warning [2] Undefined array key "userstars" - Line: 11 - File: inc/functions_post.php(803) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php(803) : eval()'d code 11 errorHandler->error
/inc/functions_post.php 803 eval
/showthread.php 1063 build_postbit
Warning [2] Undefined array key "invisible" - Line: 1497 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/showthread.php 1497 errorHandler->error
Warning [2] Undefined variable $threadnotesbox - Line: 30 - File: showthread.php(1524) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/showthread.php(1524) : eval()'d code 30 errorHandler->error
/showthread.php 1524 eval
Warning [2] Undefined variable $ratethread - Line: 38 - File: showthread.php(1524) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/showthread.php(1524) : eval()'d code 38 errorHandler->error
/showthread.php 1524 eval




Super randomness of random (also dice)
#1
Hi there,

Lets start with the very basics of how a dice or Random number generator works. A dice is a cube shaped object with normally six (eight, ten or hundred) sides. These when thrown display a random number based on variables such as force, friction, gravity, physics, quantum mechanics and GODDAMN NINJA ASSAMITES!

RNG is what the jove program uses to replicate this effect (RNG stands for RANDOM NUMBER GENERATION). RNG is generated based on a SEED value. A seed value is a decimal point number between 0 and 1 that is used to figure out all future algorithms to generate the number. A seed value can be calculated from a variety of different components on your PC/ server but the most regular ones are internal clock time, CPU cycle and CPU temperature. Due to seed value only being calculated once and then used in future, the randomness of a virtual RNG isn't true randomness as you've no doubt noticed.

JOVE uses the bare basic random number generator and to put it plainly that's not very good. It's barely passable as random and this is why you'll notice dice rolled in close proximity to be almost identical. The edit I'm going to suggest is the MERSENNE TWISTER.

Many random number generators of older libcs have dubious or unknown characteristics and are slow. By default, PHP uses the libc random number generator with the rand() function. The mersenne twister in contrast uses a random number generator with known characteristics using the » Mersenne Twister algoritm, which will produce random numbers four times faster than what the average libc rand() provides. It'll also be significantly faster than the libc rand().

HOWEVER! The mersenne twister becomes biased towards even numbers when its max (optional highest number, in the case of a d10 dice, this should be 10) is above 2^32(4294967296)

To implement the Mersenne twister into the php code you simply change rand(); to mt_rand(); (If there's numbers in the brackets, keep those in!)
Reply
#2
I don't know WHO you think you IS, Sergee

but you can totally stay and sit by me. I just dropped that change into the code and successes have changed dramatically.

I went ahead and made the change to the sitewide roller. Since on a little sample of dice rolls I got massive successes, I'd like it if people (Admins in particular) kept an eye on the dice rolls. If they are at an optimal level we may need to discuss reintegrating the "1s cancelling suxx" rule, which was only removed because the Jove roller sucked and everyone was tired of failing rolls with 6+ dice because 1s would swoop in and steal all the suxx.

For me it's less about sticking to rules and more about finding a balance that makes players feel like they had to work for their triumphs without feeling like they have to climb all the way to the top of Mt. Doom every time they roll some dice (Samael, I'm looking at you, bud).

Anyway, yeah, so. Yeah! That's a thing to think about.

And thank you so much, Sergee! Welcome to Denver!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)