Unpredictable, ubiquitously rng seed

Started by
25 comments, last by Bacterius 8 years, 6 months ago
I was contemplating how to create a game that could be played by mail/email... the easiest thing would be to create it such that there is no randomness involved in gameplay... chess for example is a great PBM (play by mail) game b/c there is no dice, no drawing, etc. But... Personally I prefer my games to have at least some rng. The problem with rng over PBM is obviously synchronization or the RNG. However, if both players used the same seed and rolled values in the same order then both players would obtain the same results despite a lack of data communication. First I thought to just use the current date (or some operation based on the current date) as the seed. The issue with this is that a player could theoretically choose their actions, then since they already know the seed test the results... if they come out unfavorably they could re-order their actions and choose the order that is most advantageous. So, the goal is to find a value which is unknown to each player until after actions have been choosen. One option I had considered was, at the beginning of the game players agree on a company in the stock market... turns would be due before midnight and the following morning the stocks opening price would be the seed. Unfortunately stocks are not traded on the weekend, so players would be limited to only playing on weekdays. Can anyone think of an rng seed source that would produce a new unpredictable seed value at least once a day that could be found by any one with an internet connection and also does not require the users to synchronize when they look up the value? The source should also be reliable (i.e supplied from some site/source that is unlikely to disappear).
Advertisement

Can anyone think of an rng seed source that would produce a new unpredictable seed value at least once a day


You're really not asking about Game Design here. Moving this to a more suitable forum. Hope you get a good answer or a better solution.

-- Tom Sloper -- sloperama.com

Why not just use UTC date? It's the same for everyone no matter what, and changes exactly once per day.

http://www.timeapi.org/utc/now

Maybe weather or some other environmental variable. Like from the National Weather Service (weather.gov) or the Space Weather Prediction Center (http://www.swpc.noaa.gov/). It'd be kinda cool to use x-ray flux or solar wind speed.

A UTC timestamp is good, but it is predictable. A player can decide his actions on the seed that will be used on the upcoming day.

I think the best approach would be a known seed, but salted with a number supplied from both players. This way, a player cannot determine what the next seed will be for the next advance of the game state:

1. Player A and player B agree on a PRNG algorithm and a starting seed from a third party source. A random number table can work really well for this purpose.
2. At the end of each turn, each player decides on a non-zero number (the salt) that should be added to the seed.
3. On the start of the next turn, the sum of both the player's chosen salts are added to the seed.
4. Each player solves the new game state with his and the other player's actions, using the new seed.


The outcome of each turn can be verified, since the PRNG algorithm is known, the state of the seed is deterministic.
There are several web sites and companies that do dice rolls online, then email or otherwise give the results to everyone.

You could use that for your seed. Whatever the daily third-party dice roll email says to use, you use. Nobody can predict what it will be that day, although they could peek ahead once the roll is known.

@Tom Slooper: Sry, thx.

@Valrus: That site looks like a winner. In particular http://services.swpc.noaa.gov/text/daily-particle-indices.txt

@fastcall22: But if both players provide a chosen salt to each other the player who first receives their opponents salt could choose a salt that makes the final value most advantageous to themselves. The third party source still needs to be unpredictable unless the trading of actions where synchronized.

Stand up your own webpage that produces a number each day? I don't see why you can't run the shared source of random data...

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

The salt solution can be made to work using a cryptographically secure hash function, like MD5 (EDIT: or SHA-3 if you are paranoid), and a couple of extra messages. So each player picks a secret salt, computes its hash and sends it to the other player. Once a player has received the hash of the other player's salt, they reveal what their original salt was. When a player receives the salt from the other player, it's easy to verify that its hash is indeed what had been sent originally.

Hi

As far as I can tell:

Given that I know the algorithm of the game and how it process the random number into game data.

I could create a table of seeds and the next few random numbers each seed will create.

If I want particular outcome I could chose a seed from my table that gives useful random number for my case.

If I have a big table it could be impossible for the opponent to identify if the seed was "prepared" or not.

Sisofys.

This topic is closed to new replies.

Advertisement