PDA

View Full Version : Ways to generate random numbers



Cicciograna
2011-04-19, 04:47 PM
Apart from dice, what ways of coming out with random numbers come to your mind? Do you know particular devices which can reliabily (or at least, as reliabily as a game requires) spew out random ciphers?

My question has a specific purpose: I found many random dungeon solo games on the Net, but many of them still require dice; given that I use to travel a lot by train I'd love to have some way to get random numbers: sure, I could install a dice roller on my smartphone, but I'd love a mechanical device to obtain the same result, without resorting to electronics.

So, ideas?

Kylarra
2011-04-19, 04:48 PM
Cards usually work. You'll need to use two suits to do your D20, but other than that.

LansXero
2011-04-19, 04:59 PM
You could use a chronometer to generate 1-60 and 1-100 random results :D (seconds and centesimals)

Cicciograna
2011-04-19, 05:47 PM
OMG, I think I got it! I just had the greatest idea! The trick is to use an MP3 Usb stick and its "random song" function.

Create a lot, really a lot of sets of dice rolls, arranged in sets such as d2-d4-d6-d8-d10-d12-d20-d100: for example, one said set could be 01-02-04-08-07-11-12-44.
If you want shorter strings, just use d8-d12-d20, and to have the d2 and d4 just divide the d8 by 4 and 2, for the d6 divide the d12 by 2, for the d10 divide the d20 by 2 and for the d100 repeat the last step two times.

Now, create many empty .mp3 file named as each string, load them in the MP3 stick and, when you need a roll, just skip to the next, random, "song"!

LansXero
2011-04-19, 05:50 PM
OMG, I think I got it! I just had the greatest idea! The trick is to use an MP3 Usb stick and its "random song" function.

Create a lot, really a lot of sets of dice rolls, arranged in sets such as d2-d4-d6-d8-d10-d12-d20-d100: for example, one said set could be 01-02-04-08-07-11-12-44.
If you want shorter strings, just use d8-d12-d20, and to have the d2 and d4 just divide the d8 by 4 and 2, for the d6 divide the d12 by 2, for the d10 divide the d20 by 2 and for the d100 repeat the last step two times.

Now, create many empty .mp3 file named as each string, load them in the MP3 stick and, when you need a roll, just skip to the next, random, "song"!

Wouldnt it be easier to just have separated 4, 6, 8, etc. songs long playlists?

Cicciograna
2011-04-19, 05:54 PM
Wouldnt it be easier to just have separated 4, 6, 8, etc. songs long playlists?

This way I should navigate each time to a different playlist, which could be lenghty, depending on the model of the MP3 player. With my system the only thing I have to do is to change song.
But I admit that with your system there's no limit to the type of dice rollable.

sengmeng
2011-04-19, 06:18 PM
A stopwatch could be a d10 or d100 by starting it, waiting a little bit, and stopping it, then taking the hundredths of a second or whatever as the result. It's still electronic, but you won't lose dice on a train, and it doesn't rely on another device. Some games that's all you need, I don't know if that helps.

Edit: it could be any dice, I guess, if you just "reroll" until you get a number inside of the range you want.

Kerrin
2011-04-19, 11:39 PM
You could try this site http://www.random.org/integers/ for a quick set of random numbers.

I've used it for pre-rolling NPC initiatives and such.

Binks
2011-04-20, 11:53 PM
OMG, I think I got it! I just had the greatest idea! The trick is to use an MP3 Usb stick and its "random song" function.

Create a lot, really a lot of sets of dice rolls, arranged in sets such as d2-d4-d6-d8-d10-d12-d20-d100: for example, one said set could be 01-02-04-08-07-11-12-44.
If you want shorter strings, just use d8-d12-d20, and to have the d2 and d4 just divide the d8 by 4 and 2, for the d6 divide the d12 by 2, for the d10 divide the d20 by 2 and for the d100 repeat the last step two times.

Now, create many empty .mp3 file named as each string, load them in the MP3 stick and, when you need a roll, just skip to the next, random, "song"!

An interesting idea (though why you'd rather go through all the trouble of doing this rather than just installing an app and being done I have no idea) except for one problem. Most 'random song' functions are not truly random. And I'm not even talking about psuedo vs. real random, I mean they're generally weighted slightly towards higher rated songs.

If yours isn't then that'll work...but it's exactly the same as using a random number generator, just more round-about. If you have a smartphone just go with the app IMHO. I've been using one for a while now and I haven't looked back. The app is superior is almost every way to a normal die, it's fast, never falls off a table. It does require some more trust from the other players (setting the phone down and rolling with the screen visible helps) but if you're playing online anyway who cares?

kieza
2011-04-21, 07:52 PM
If you use a laptop, type "=rand()*x+0.5" into Excel, replacing x with the size of die you want (4 for d4, etc). Decrease the decimal places until they're gone. What you now have is a randomly generated number between 1 and x. You can copy and paste it as much as you like, and whenever you type in another cell (or delete the contents of another cell) the roll refreshes. I generate 10 for each of several sizes of dice, and then I just type gibberish into a blank cell to reroll.

NNescio
2011-04-21, 08:32 PM
You can use a random number table and pick a random number by blindly stabbing a pencil to mark your number. (which you then open your eyes to find out, without lifting said pencil.)

The Lone Wolf series of gamebooks uses this method, 'though it can be a bit predictable if the same table is used repeatedly.

A more... 'rigorous' method can be achieved by using a book filled with pages of random numbers (or a series of random number tables bound together), with the user picking the page randomly with his eyes closed. This was one of the methods used by scientists in the past to 'generate' 'random' numbers.

TheCoelacanth
2011-04-21, 08:36 PM
There's a pseudo-random number generation algorithm (LFSR) that's simple enough to do with a pen and paper if you know how to convert numbers from binary to decimal. There's one that only needs 10 bits of storage for each number you generate and it doesn't repeat until after 1023 numbers.

You have to come up with 10 "random" binary digits on your own. It doesn't really have to be random, just don't use the same one twice or else you'll get the same sequence of random numbers.

Start with that number:
1011100100

Add together the first and fourth digits, if it's even use 1 for the next step, if it's odd use 0. In this case 1.

Then shift all of the digits right one place getting rid of the rightmost digit, putting the new number as the left most digit.

1011100100 -> 0101110010

That's your number. Just repeat to get more numbers.

Cespenar
2011-04-22, 02:10 AM
Chronometer of your digital watch, or those fancy scientific calculators you use in school. I've designed and played many silly games using those throughout grade and high school, so I know they work. :smalltongue:

randomhero00
2011-04-22, 11:38 AM
The big graphing calculators, for instance the TI-83 Plus can do random numbers. To do it on this calc go to math, scroll sideways to PRB, scroll down to randInt(

valadil
2011-04-22, 11:45 AM
If I have a computer handy I use this:

function roll() {
if [ $# -lt 1 ] ; then
echo -e "\nUsage: roll [n] d\n\nRoll n dice of size d. If left out, n is assumed to be one.\n"
else
TYPE=$1
if [ $# -eq 2 ] ; then
TYPE=$2
NUM=$1
else
NUM=1
fi

for i in `seq $NUM` ; do
seq 1 $TYPE | shuf -n 1
done
fi

}

It lets me roll dice in my command line.

For less crunchy games, rock paper scissor works reasonably well.

A while back I did a small improved White Wolf game. I think the rules were inspired by Minds Eye, but I don't remember if they actually correspond to real rules or if we just made up something similar. Basically if the player had a description that would give them an advantage in a situation they had to win or tie RPS. A strong character would do well in fights for instance. If they did not have such a description, they lost on a tie.

Also used RPS for LARP combat. Everyone had a score from 1-5. In a fight the winner of RPS gained a +2 and then scores were compared. Winner gains advantage. If you win while you already have advantage, you knock out your opponent.

Seb Wiers
2011-04-23, 01:48 PM
Paste this code into your browsers URL bar, then bookmark it. When you click the bookmark, you'll get dialog boxes that let you generate random numbers.


javascript:alert(Math.floor(Math.random()*prompt("Generate random number from 1 to x. Enter x:"))+1);

Cicciograna
2011-04-23, 02:36 PM
Paste this code into your browsers URL bar, then bookmark it. When you click the bookmark, you'll get dialog boxes that let you generate random numbers.


javascript:alert(Math.floor(Math.random()*prompt("Generate random number from 1 to x. Enter x:"))+1);

Heh, I love bookmarklets :smallsmile: