I'm wondering if anyone has any solid information on the Karmic dice system?

Ostensibly, it seems that the intent of the karmic dice system is to define a stochastic process that is essentially the same as dice rolling, but that satisfies the 'law of small numbers' (short sequences of rolls have the same distribution as long sequences of rolls). In other words they want to implement the gambler's fallacy. Anyone familiar with probability theory will likely be thinking of a Markov chain as the appropriate process to achieve this, and ways to implement it are immediately obvious.

One way to simulate from a process with this property is to keep a running dice probability, so that your 20 sided dice for example initially has a uniform distribution, [1/20,1/20,...,1/20], and each time a roll occurs the distribution is updated. It's not hard to choose transition probabilities such that in the long run, you're equally likely to turn up any number as any other, but you're unlikely to see long streaks. One way is to redistribute a portion of the probability of an outcome uniformly among the others whenever it turns up - if the proportion is 1, you never see the same roll twice in a row.

The disadvantage of this method is that, while you're less likely to see the same number come up repeatedly, you are, in the short run, no less likely to see groupings of similar outcomes (perhaps anything over a 15 is a 'good' roll, and you don't want to see a sequence of 5 'good' rolls, such as 16,17,18,19,20). This can be overcome by categorizing rolls into, for example, quartiles, and redistributing weight between categories, rather than individual outcomes. This is very easily achieved, and can be demonstrated to have uniform distribution in the long run. Here is some MATLAB code that does this:


P = ones(1,20)/20;
G = [1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4];
cP = cumsum(P);
count = zeros(1,20);
list = zeros(1,1e5);
w = 0.5;
for i = 1:1e5
y = rand;
outcome = find(cP >= y, 1,'first');
count(outcome) = count(outcome) + 1;
list(i) = outcome;
category = G(outcome);
inds = G == category;
redist_weight = sum(P(inds));
P = P + ones(1,20)*redist_weight*w/sum(~inds);
P(inds) = (1-w)*redist_weight/sum(inds);
cP = cumsum(P);
end

Now, all of that said empirical data collected by akdavidxy on Reddit (https://www.reddit.com/r/BaldursGate3/comments/zwqaem/psa_having_the_karmic_dice_setting_turned_on/) seems to suggest that this is not what they are doing. In fact, it seems that the long run distribution is not even uniform, which in my view would be the most fundamental property of the natural distribution of dice rolls to preserve. Not only is the distribution not uniform, the mean isn't even preserved! Forget preserving the long run distribution of the dice rolls in short sequences, it's not even preserved in long ones!

If this sample is representative of the actual implementation, it would seem that they've missed the mark by a very wide margin. Perhaps then, the intent is not as stated above, but rather to fundamentally change the distribution of outcomes (it's getting a bit unfair to call these dice rolls at this point) in the game. Weighting everything more toward success, and less toward failure. Perhaps the 'law of small numbers' interpretation of their intent is completely off the mark.

Personally, I'm a big fan of dice as a source of randomness in games. They're simple, and all of the information you need to understand how them is readily available. This allows you as a player to make informed decisions about how you play the game. When I saw the karmic dice system, I assumed they were doing something similar enough to what I've described above, based on their description - basically the same as dice, but with the gambler's fallacy built in. Reducing the probability of 'lucky/unlucky streaks' compared to natural dice rolling is not a bad idea, and since it's all happening on a computer (where it's easy to implement) why not? Worth a shot at least, might make an overall more enjoyable experience (although lucky/unlucky streaks themselves can be quite fun, so that's debatable). Turns out it's not doing what it says on the tin? Anyway I would love to hear more from anyone who knows anything about how this system is implemented or what its actual intent is.

Thanks for reading.

Last edited by Triddle; 14/07/23 01:26 AM. Reason: Fixed some typos