This starts by assuming humans are bad at coming up with unbiased numbers but then requires them to do so. I don’t get how this could work with biased inputs.
> We can prove that in an ideal situation, the die roll will be fair. Assuming both parties can come up with unbiased random numbers ranging from [0;12)...
Doesn't that assumption remove the entire problem though? I thought the whole reason for the method was that people can't easily think of an unbiased random number.
Or put differently, if that's your starting point, what's stopping you from simply doing (A mod 6) + 1?
Another procedure based on a similar problem I worked on with a friend: you both pick positive integers a and b, then add them together to create c. Either sqrt(c) or sqrt(c+1) is irrational and the fractional digits provide your random numbers. If you need a new sequence, you take some digits from the current expansion and sqrt() them again.
(However, if the stakes are high enough, the party that learns the outcome first can choose to exit the protocol if they are unsatisfied with the result.)
I think you need 0-5 to avoid bias. (If you are good at generating random 0-9, then you are biasing 0-4 over 5-6, in the mod-6 regime, and I can preserve that bias by preferring to choose small or large numbers depending on whether I want a small or large result)
You could just play rock paper scissors three times and use the results as bits for d6? Maybe dropping 111 and alternating who is 1?
Edit, I realize you’d have to drop 111 and 000 to get 6, not sure what I had in mind in the original, either way it balances. It’s also nice because I don’t think you can intentionally lose rock paper scissors.
If you have a coin: Heads and tails represent bits. Flip a coin three times and add up the result to emulate a six-sided dice roll. e.g., heads, heads, tails = 3. If you get 7, then try again.
You could draw long/short straws to generate bits but since the challenge limited the tools to mortal bodies any other guessing game would do.
One could put his hands behind his back with one hand palm open and the other hand in a fist. The other one then guesses which hand is open and him being right or wrong generates either a 1 or 0. Repeat N times for an N-bit binary number. Both players can influence their choice equally and also equally make assumptions about the other player's intentions when making their own choice.
This explanation with angles makes this seem more complicated than it is. Two adversaries think of two numbers 0-11. Both say one aloud, add the other person's number to the one that wasn't said, then subtract 12 if it's higher.
As a bonus, the other person doesn't know what you "rolled" unless you tell them, which was important for the game I was making.
An alternative, because the use of dice is to effectively decide an outcome: for example, Knight (Player1) fights Troll. Have both players agree on a short set of possible outcomes. For this example:
1-Knight defeats Troll
2-Troll defeats Knight
3-Troll is wounded but escapes
4-Knight is wounded but escapes
5-Another character or party comes into scene
Then Player2 decides which outcomes are assigned to which numbers (1-5), keeping them a secret and Player1 picks a number not knowing the outcome it stands for.
It's quicker and within reach of us, mere mortals.
This looks srsly overengineered. There's an easier way.
Each player chooses simultaneously an integer from [1, N]. (Like, draw a chit and reveal them simultaneously.) Sum the draws. For a sum of N+1 or more, subtract N.
I saw some gamebook for two players many years ago that had a small 5x5 table printed on each page. When players needed a random number 1-5 they simultaneously revealed a hand showing 1-5 fingers and used the table on the current page to cross-reference to get a number .
Of course it would work fine without the table, just using simple maths, but I think having unique tables on each page to scramble the result removes some of the ability of players to try to mind-game each other.
It would not work as well for ranges other than 1-5.
Probably beside the point because I imagine the author just wanted to show a neat math-based solution, but in this situation with no dice available I've just used playing cards. If you want to simulate a 6-sided dice roll you grab cards 1-6 and shuffle, nice and simple
> Assuming both parties can come up with unbiased random numbers
When you're in competition, this cannot be assumed. You'll each bias the numbers you come up with towards your preferred outcome. Even with A + B mod N, you can still bias the results when you know what your opponent is trying for.
A fairer approach would be to make a long series of randomized values. Your opponent secretly chooses a starting offset, and you pick an offset to add.
23 comments
[ 2.7 ms ] story [ 50.4 ms ] threadDoesn't that assumption remove the entire problem though? I thought the whole reason for the method was that people can't easily think of an unbiased random number.
Or put differently, if that's your starting point, what's stopping you from simply doing (A mod 6) + 1?
BTW a "classic" method of generating random numbers is to look at the second hand of a watch mod n.
Might not be unbiased, but good luck proving it.
I'd prefer that one person choose a non-square integer, and the other choose (very large) n.
(However, if the stakes are high enough, the party that learns the outcome first can choose to exit the protocol if they are unsatisfied with the result.)
In [18]: n = 10000000
In [19]: tally = [0,0,0,0,0,0]
In [20]: for i in range(n): ...: tally[(random.randint(0,9)+ random.randint(0,9))%6]+=1 ...:
In [21]: tally Out[21]: [1600008, 1600460, 1699599, 1799697, 1699604, 1600632]
Edit, I realize you’d have to drop 111 and 000 to get 6, not sure what I had in mind in the original, either way it balances. It’s also nice because I don’t think you can intentionally lose rock paper scissors.
One could put his hands behind his back with one hand palm open and the other hand in a fist. The other one then guesses which hand is open and him being right or wrong generates either a 1 or 0. Repeat N times for an N-bit binary number. Both players can influence their choice equally and also equally make assumptions about the other player's intentions when making their own choice.
Oh shame I though you were going to solve that problem.
As a bonus, the other person doesn't know what you "rolled" unless you tell them, which was important for the game I was making.
1-Knight defeats Troll 2-Troll defeats Knight 3-Troll is wounded but escapes 4-Knight is wounded but escapes 5-Another character or party comes into scene
Then Player2 decides which outcomes are assigned to which numbers (1-5), keeping them a secret and Player1 picks a number not knowing the outcome it stands for.
It's quicker and within reach of us, mere mortals.
Each player chooses simultaneously an integer from [1, N]. (Like, draw a chit and reveal them simultaneously.) Sum the draws. For a sum of N+1 or more, subtract N.
Of course it would work fine without the table, just using simple maths, but I think having unique tables on each page to scramble the result removes some of the ability of players to try to mind-game each other.
It would not work as well for ranges other than 1-5.
When you're in competition, this cannot be assumed. You'll each bias the numbers you come up with towards your preferred outcome. Even with A + B mod N, you can still bias the results when you know what your opponent is trying for.
A fairer approach would be to make a long series of randomized values. Your opponent secretly chooses a starting offset, and you pick an offset to add.
So for 1d6:
You don't need a ton of rows. Each possible roll value must appear once in each row.Your opponent places a marker on one of those numbers and keeps that information hidden.
- Let's say they choose the "1" at row=2, col=5.
Now you pick a number from 1 to 6.
- Let's say you choose 5.
Now they reveal where the marker is set (row=2, col=5).
Now you advance from the marker by 5 (wrapping around in the row if necessary).
- so from row=2, col=5, you advance by 5 like so: 6, (wrap) 4, 3, 5, 2 (ending at row=2, col=4).
You "rolled" a 2.