Skip to Content

Mechanical pseudorandom number generator

13 replies [Last post]
snak_attack
Offline
Joined: 12/31/1969

Several game designs I have floating around in my head all have the need for some mechanism to generate biased random numbers, where the bias is unknown to the player(s). For example, imagine a black box where each time you press a lever you get out a number that is basically 1d10 + X, where X is a fixed but unknown amount.

An example usage - say you have a farming game where there are three farm fields (each represented by one of these boxes). The three farm fields give semi-random yields - some fields are better than others. Only by observation can the players decide which field is on average a better investment.

Now, the tricky part. I'd like to devise a physical/mechanical device that can generate these kinds of numbers, but is easy to use. Some ideas I've considered are:
- Large pre-generated charts that have the desired distribution. Values are 'selected' by rolling a number of dice and using those as lookup keys (using 2d10 to get a number from 01-100)
- Something like the code wheels they used to use for game copy protection
- Drawing tiles from bags

The first two are cumbersome to use, the third is difficult to seed in a consistent manner.

Any other ideas? I'd even be open to building a simple machine

snak_attack
Offline
Joined: 12/31/1969
Mechanical pseudorandom number generator

There are tons of applications of this, but I'll give just one more to maybe help demonstrate where I'm going with this. Each 'black box' could represent a racehorse, the output could represent it's speed. A game could consist in a series of many races, with the players placing bets on various horses in each race

And - I'm looking more for ideas for how to implement this, rather than ideas on how to use it once it's built

seo
seo's picture
Offline
Joined: 07/21/2008
Mechanical pseudorandom number generator

Does the bias need to be exactly the same, or a bit of variation would be acceptable?

I'm thinking of a relatively simple machine, basically a modified Wallenstein dice tower, that will allow for some unknown bias being added to the mix.

As I'm writing this, an idea came to my mind to have an exact amount of bias. I'll try to draw some sketches and post them tomorrow.

Seo

TheReluctantGeneral
Offline
Joined: 12/31/1969
Mechanical pseudorandom number generator

I'm wondering how the generator is setup to begin with? Are a series of different numbers treams required each with a different bias? If so, then how are these setup without one or more players gaining access to the weighting factor?

That aside, here's my idea. I think I'm reading your question correctly but I'm not sure...

Use two or more concentric dials (one inside the other like a multi -lane circular racetrack) with numbers around the circumference. The dials are placed inside an opaque holder which has two windows which display one number from each dial at any one time. When a new number is required both dials are turned by some random amount (perhaps being decided by rolling a D10), and the output number is the sum of the two numbers shown in the two windows.

This suggests a solution to the setup problem. All dials are blank one one side and can be selected at random and inserted into the holder without anyone knowing which ones they actually are.
Different biases can be create dby selecting different dials.

seo
seo's picture
Offline
Joined: 07/21/2008
Mechanical pseudorandom number generator

But then, if I'm getting your idea right, after the first reading of the dials the players will know the bias value. I thoght the idea was to keep it unknown. Otherwise a simple card deck with cards of different values would do, just draw a card face down, roll the dice, turn up the card and add the values.

Seo

TheReluctantGeneral
Offline
Joined: 12/31/1969
Mechanical pseudorandom number generator

You originally asked whether the bias needed to be constant or whether some variation was allowed. I kind of assumed the latter, in which case the bias would not be known since the bias dial would have many different numbers, which collectively when combined with the other dial give the right overall result.

The original specification was somewhat ambiguous...

seo
seo's picture
Offline
Joined: 07/21/2008
Mechanical pseudorandom number generator

Ahh! Now I get it.

I agree about the original post being a bit ambiguous. It talks about a 1d10+X generator, but that is a bit contradictory with the requirement for X remaining unknown. If the black box produces results 11, 21, you'll know from then on that x=10.

I think a bit more detail about what exactly is being looked for would help us to come up with the best solution.

When I think bias, I tend to think of unbalanced dice where some results happen more often than others. Or the set of results you get when using more than one die. But that doesn't seem to be what's required here.

So some more detail from snak_attack would be great.

Seo
PS: Your avatar makes me feel like I shouldn't ever disagree with you, or risk being strongly punished. I like it, though. it might have something to do with a low self esteem or something. ;-)

Hambone
Offline
Joined: 12/31/1969
Mechanical pseudorandom number generator

Quote:
each time you press a lever you get out a number that is basically 1d10 + X, where X is a fixed but unknown amount

My initial thought was just increasing the numbers on the die. It makes it hard to keep X a secret when you can examine all sides of the die, so I added one change. Place the die inside a contraption like a magic 8-ball (hard to describe so I hope you know what I am referring to), so you can only see the result and not the other faces of the die. If 21 came up as the result, x could be anything between 11 and 20. Next result is 16. (X can be 11 to 15). Next result is 14.Now I narrow down X a little more (between 11 and 13) and have a better idea if this die is the more productive one. If there were several dice producing several results, it could be quite a challenge trying to keep track of the better performing ones. Especially if they look similar.

FastLearner
Offline
Joined: 12/31/1969
Mechanical pseudorandom number generator

A magic 8 ball (with liquid and everything) was my first instinct, too. Very cool.

All of my other thoughts have failed upon further examination (except one with weights, but I'm skipping that for now).

snak_attack
Offline
Joined: 12/31/1969
Mechanical pseudorandom number generator

Thanks for the thoughts so far. Yes, I guess the 1D10+X may have been a bit of a red herring - ideally the range of numbers would be fixed, but the distribution of the numbers produced by different instances of these boxes would be different. So one box might produce the numbers

1,4,2,5,2,5,10,3,6,1,2

another might give
8,6,9,6,5,9,1,10,8,7,5

adagio_burner
adagio_burner's picture
Offline
Joined: 07/30/2008
Mechanical pseudorandom number generator

Hmm, how about "unfair dice"? Buy a number of large, good quality 1d6 dice. Dirll a hole in each of them, and put some lead into it. Close the hole, paint it over if you have the time. I bet you won't know yourself howthis will affect what the die rolls... To make the dice even less recognizable/predictable, you may drill several holes in each of them.

TheReluctantGeneral
Offline
Joined: 12/31/1969
Mechanical pseudorandom number generator

seo wrote:

PS: Your avatar makes me feel like I shouldn't ever disagree with you, or risk being strongly punished. I like it, though. it might have something to do with a low self esteem or something. ;-)

He does have a very dissaproving glare doesn't he? Unfortunately it doesn't work on everyone.

Quote:

So one box might produce the numbers

1,4,2,5,2,5,10,3,6,1,2

another might give
8,6,9,6,5,9,1,10,8,7,5

In that case, I'd still go for the dials, but simply have one dial in a holder with a single window showing one number - even easier. Select the dial face down and put it in the holder and then put the unused ones away. You can pregenerate whatever number sets you like for each dial using an algorithm that gives you the desired range and value distribution.[/i]

Shellhead
Offline
Joined: 12/31/1969
Mechanical pseudorandom number generator

What about "exploding" dice, dice that get re-rolled and added to the total when a certain value is rolled? For example, if you are rolling a ten-sided die, and it comes up as a "10" (the exploding number), treat that as a "10", then you re-roll a "5", for a total of 15. You could make this open-ended, so that 10's keep exploding, or you could limit it to a single re-roll and add, like the tenth frame in bowling. You could also increase the chances of explosion by making more numbers on the die explosive.

Julius
Offline
Joined: 12/31/1969
Mechanical pseudorandom number generator

My first response was to "go to radio shack and buy a few bucks worth of parts."

All you would need is a power source, a clock crystal, a few registers (cheap chips), a pushbutton, a binary to 7 segment decoder (another cheap chip), and a display.

http://www.cs.umbc.edu/~squire/cs313_l23.html

Wire yourself a pseudo-random sequence generator, and set up the button to stop the clock. It will cycle through all N available values at whatever speed (faster than you care), and when you press the button, it stops on one of them.

With a little logic, you could have it display whatever values you wanted.

Syndicate content


forum | by Dr. Radut