Randomness algorithm

Discussion of GameTable Online's version of the classic strategy game. Strategy discussions, feature requests, bug reports all go here!

Randomness algorithm

Postby Kommandant » Wed Jan 05, 2011 8:59 pm

Just curious what people think of the new dice option. I prefer standard as its what I'm used to and know what to expect. I have only tried the SHA1PRNG once.
User avatar
Kommandant
Squire
 
Posts: 44
Joined: Sun Feb 28, 2010 7:50 pm

Re: Randomness algorithm

Postby vcxz » Thu Jan 06, 2011 8:13 am

I wish I knew what it was. I am starting a new game and it is an option that has never been there before. I understand standard dice / low luck, but if I pick low luck, what then does it mean to select standard vs. Sharp (or whatever they are called)? please help me out. I didn't see this as something in the FAQ (did I miss it?).
vcxz
Page
 
Posts: 1
Joined: Thu Jul 08, 2010 6:38 pm

Re: Randomness algorithm

Postby gingerbenjamin » Thu Jan 06, 2011 10:47 am

I presume SHA1PRNG=Low luck. I could be wrong.....
User avatar
gingerbenjamin
Swordsman
 
Posts: 248
Joined: Thu Jan 08, 2009 8:29 am
Location: Paris

Re: Randomness algorithm

Postby RobEng » Thu Jan 06, 2011 11:29 am

http://www.componentix.com/blog/6
It is an alternate dice randomization algorithm that Fillmore suggested. It seemed like a sound alternative that was easy to implement. As it may only provide "more randomness," it would require a statistical analysis that we are unable to devote time to, either the collecting of data or analysis. Feel free to use it or not.
User avatar
RobEng
GTO Admin
 
Posts: 2130
Joined: Tue Jul 10, 2001 4:11 pm
Location: Holyoke, MA, USA

Re: Randomness algorithm

Postby gingerbenjamin » Thu Jan 06, 2011 11:47 am

My mistake...only just looked at options
User avatar
gingerbenjamin
Swordsman
 
Posts: 248
Joined: Thu Jan 08, 2009 8:29 am
Location: Paris

Re: Randomness algorithm

Postby rjscmk » Thu Jan 06, 2011 5:24 pm

Thank you GTO admin. I will use it, just because it exists. Time will tell.... Although, I'm sure I'm gonna whine every time I lose a bomber to aa guns lol!
rjscmk
Warrior
 
Posts: 162
Joined: Mon Jul 12, 2010 4:24 pm

Re: Randomness algorithm

Postby pgg » Thu Jan 13, 2011 6:54 am

Please, could i know real differences between Standard algo and the new SHA1....
Thank you
pgg
Page
 
Posts: 1
Joined: Tue Aug 26, 2008 4:11 pm

Re: Randomness algorithm

Postby RobEng » Thu Jan 13, 2011 10:54 am

pgg wrote:Please, could i know real differences between Standard algo and the new SHA1....
Thank you

Here you go http://www.componentix.com/blog/6.
User avatar
RobEng
GTO Admin
 
Posts: 2130
Joined: Tue Jul 10, 2001 4:11 pm
Location: Holyoke, MA, USA

Re: Randomness algorithm

Postby UserIName » Sat Jan 15, 2011 5:36 pm



posted
UserIName [Moderator] 0 minutes ago
Question for you: At a site that decided to add your idea of the SHA1PRNG, http://www.gametableonline.com, one programmer had written the re-seeding (not clear which, as you stated above there two variations), was being done 1 time at the start of a game. This was for Axis & Allies, which is a long game with many dice used, maybe somewhere between 1,000 to 10,000, grouped into rolls of between 1-10 usually, and sometimes anywhere from 10-50+. What type of seeding options would there be for numbers being generated in many groups, and with a scale such as this?
UserIName
Veteran
 
Posts: 96
Joined: Mon Mar 09, 2009 10:28 am

Re: Randomness algorithm

Postby Kandelon » Mon Jan 17, 2011 3:21 pm

10,000 still isn't that big a scale; Based on what I've read you'd have to roll billions of times before it would repeat the way we're using it. There are issues with Java's Random's lower order bits repeating a lot more frequently, but nextInt(n) uses the higher order bits. So with nextInt(6) you only use the highest few bits and thus get very random results. Presumably SHA1PRNG is much better with the lower order bits even if we aren't using them, and probably at least a bit better for the bits we do use.

Reseeding often actually reduces randomness, especially if done very rapidly. For our purposes, reseeding is not needed at all within one game.
User avatar
Kandelon
GTO Admin
 
Posts: 757
Joined: Thu Apr 29, 2004 9:34 pm

Re: Randomness algorithm

Postby UserIName » Tue Jan 25, 2011 12:09 am

Actually, those estimates "1,000 to 10,000" were speculative. One round of USSR attacking to start, generates around 60-90 maybe. Obviously battles get a lot bigger later.

Does someone have counts of how many dice are rolled for a typical match?
UserIName
Veteran
 
Posts: 96
Joined: Mon Mar 09, 2009 10:28 am

Re: Randomness algorithm

Postby UserIName » Tue Jan 25, 2011 12:13 am

UserIName wrote:


posted
UserIName [Moderator] 0 minutes ago
Question for you: At a site that decided to add your idea of the SHA1PRNG, http://www.gametableonline.com, one programmer had written the re-seeding (not clear which, as you stated above there two variations), was being done 1 time at the start of a game. This was for Axis & Allies, which is a long game with many dice used, maybe somewhere between 1,000 to 10,000, grouped into rolls of between 1-10 usually, and sometimes anywhere from 10-50+. What type of seeding options would there be for numbers being generated in many groups, and with a scale such as this?


Here is the blog author's response..perhaps someone could help explain this a bit more, as well. Thank you.

Yuri Sakhno 5 days ago

Well, if you're planning at re-seeding at the start of new game, I'd recommend doing re-seeding on the same instance of RNG, not on new one. That way the sequence of numbers will be slightly modified and still not easily predicted. If you re-seed the generator completely (using newly-created instance) then the potential malefactor would be able to guess the sequnce if they found out the the number you seed with.
UserIName
Veteran
 
Posts: 96
Joined: Mon Mar 09, 2009 10:28 am

Re: Randomness algorithm

Postby RobEng » Tue Jan 25, 2011 1:05 pm

Thanks for this post of a 2nd opinion. I don't fully understand it myself.
User avatar
RobEng
GTO Admin
 
Posts: 2130
Joined: Tue Jul 10, 2001 4:11 pm
Location: Holyoke, MA, USA

Re: Randomness algorithm

Postby bborhani » Mon May 02, 2011 5:51 pm

Generating random numbers is a topic of interest in mathematics and computer science. If you're truly obsessed with random die results you could try http://www.random.org/...considering dice do tend to roll a certain way depending on the way they are shaped/made and that most RNGs only spit out pseudo-random numbers.

I have used their dice roller to play Revised in our groups before (actual board game) and while I can't say I prefer to play with actual dice or their dice roller, it does definitely save a lot of time in situations where you're rolling a lot of dice, specially if you have and iOS or Android device to use it on.

However, I'm not sure if it's even possible to use this sort of technique on something like A&A online. It's probably more trouble than it's worth.
bborhani
Page
 
Posts: 4
Joined: Tue Apr 26, 2011 4:56 pm


Return to Axis & Allies

Who is online

Users browsing this forum: No registered users and 1 guest