Can we have a random number generator?

Thirty seven!

Random enough?

3 Likes

[mandatory link to XKCD comic on random-number-generators redacted]

3 Likes

@codinghorror - Asking for a turing-complete markup language is not too much to ask for!

@sam - Stop doing whip-its in the Discourse lounge, and hop to it!

6 Likes

I imagined it was always part of @doctorow’s plan to help turn BoingBoing into a general purpose computer.

8 Likes

406
This is fun!

1 Like

9 Likes

What about writing a script to link to a random post in the Count To Ten-Thousand thread?

11 Likes

best
 

1 Like

a mechanical ***k?

Just look at it.

3 Likes

44 (forty-four)

Bingo!

1 Like

There’s no 406 on bingo cards. What is wrong with you?!

That’s weird. Mine does:


Here’s another fun one we can all play!

1 Like

That Bingo board looks like it’s from Malkovich’s head.

2 Likes

I think it would be complex to implement this in a way that was hard for the user to game.

You’d need to mark any edits to the post directly, as well as make it clear whether a user had simply deleted their original post and just re-written another one. I think that this would make a complex request.

One simple solution I guess is simply to make all those posts uneditable and undeleteable. But again this requires more changes than simply a macro.

Another, non-technical (and probably impracticable) solution would be to copy the way the old street lotteries (numbers rackets) used to work. A player could pick a stock index, and then the next day that would result in whatever the cent value of that stock closed at. So if in my post yesterday I picked “APPL”, that would result in a value today of “7” (closing price was 132.17).

It’s pretty ungainly, but I kind of like the time-delayed nature of it :wink:

The solution to this problem is fairly simple, you just need a pseudo random number generator, that uses the original post creation time as seed:

That’s my implementation of a javascript module that does something similar, adding a syntax for dice would be trivial.

Using a PRNG you don’t need to lock a player’s edits.

The main characteristic of this implementation of a pseudo random number generator ( PRNG ) is that numbers are pregenerated in an array using a seed.

If you use the same seed, you’ll get the same sequence of numbers every time.

From the top of my head, that has another two use cases:

Say you are playing Endless Sea (or another roguelike), and a player tries to cheat the random number generator saving just before a skill check (or closing the program), to reload the game until it’s possible to pass a check with a 1% chance of happening.

Using a PRNG you can prevent that, because after every load, the PRNG will give you the same number sequence. That is, unless the player decides to take another action that causes a PRNG number to be provided before the check, and even then, it mitigates the effect of that kind of cheat, because the player does not know how many times he has to cause a check before it is possible to succeed on the check he wants.

The other use case, is to make the seed transparent to the player, in order to allow them to share it:

That is used in Dwarf Fortress to share pregenerated worlds, and in The Binding of Isaach Rebirth, allowing players to share a procedurally generated dungeon with other players. (Say you want to play the same map that Northernlion is playing on youtube).

PS: If you use the same seeds I provide on Usage you’ll get the same numbers I did.

2 Likes

Sixteen!

Sounds interesting, maybe the random seed could be tied to the post number so edits and updates don’t mess with the results.

1 Like

One caveat, it’s better to use the post’s Date (minutes and seconds included), if it were the post’s number, the first player would always get the same roll and so on :smiley:

1 Like