Saturday, April 05, 2025

A couple of technical questions about the software powering BlogNomic

First: what version of PHP is being used to run the blog software at the moment? (In my DoV, Josh brought up the possibility that the dice roller might be returning unfair results. This prompted me to look into the matter, and apparently versions of PHP before 7.2 had a mistake in their random-number-generation code that slightly biased dice rolls towards low results unless the number of the sides of the dice was a power of 2; PHP 7.2 fixed the bug. So if we’re concerned with dice roll fairness, it’d be useful to know whether our version of PHP was newer or older han that.)

Second: I first joined BlogNomic in 2009, and have been making extensive use of the private messaging feature since then to discuss, e.g., pooling agreements. I’ve been trying to keep all the information in those old messages around, in order to help keep a record of BlogNomic’s history. However, even after going through my messages to look for redundant messages that could be deleted (e.g. because they were entirely quoted within other messages), I’m still close enough to the private message list that it might cause problems if I needed to, e.g., run a dynasty where the Emperor managed private information. As such, I’d like to suggest that it might make sense to increase the PM storage limit (unless there’s some easy method of backing up PMs that I’m unaware of that might let me save the history whilst freeing up space for messages).

Comments

Kevan: he/him

05-04-2025 07:07:25 UTC

Having checked, the server is running 7.0.33.

Kevan: he/him

05-04-2025 07:28:33 UTC

Clucky has chucked a load of dice this morning and found no bias, although I don’t know how that bias manifests: if it’s only relevant to the first random number of a script running, with later ones becoming more random, there may still be an issue.

ais523:

05-04-2025 07:31:02 UTC

Oh wow, so the random number generator probably is (very marginally) broken, then. (Typically random number generators with modulo bias, which is what was wrong with PHP’s, get the probability of each individual result wrong by less than 1 in a billion (absolute probability, not relative), but that doesn’t prevent it being slightly wrong.)

ais523:

05-04-2025 07:36:04 UTC

In order to observe a pattern in the probabilities being out, it helps to roll a dice with a very large number of sides; DICE2863311530 gives a particularly clear pattern (with most numbers in the bottom half of results being more likely than most numbers in the top half of results). If the number of sides is smaller, a 1-in-4-billion difference in the chance of a particular result isn’t normally observable; you need the difference to apply to a very large number of different results to produce an observable bias.

If numbers that large aren’t acceptable input to the random number generator, DICE1717986918 shows a similar but less extreme pattern (with most results in the low half being 50% more likely than most results in the high half).

The Dice Roller doesn’t currently allow dice with that many sides, though; limiting it to just a million sides, it’d be hard to notice a pattern.

You must be logged in as a player to post comments.