Jump to content
  • Advertisement
Sign in to follow this  
AuthenticOwl

Unpredictable, ubiquitously rng seed

This topic is 1017 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

@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.

Share this post


Link to post
Share on other sites
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. Edited by Álvaro

Share this post


Link to post
Share on other sites

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.

Edited by Sisofys

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!