230 Open Daily games
1 Open Realtime game
    Pages:   123   (3 in total)
  1. #1 / 46
    Premium Member Yertle
    Rank
    Major General
    Rank Posn
    #21
    Join Date
    Nov 09
    Location
    Posts
    3997

    It's bound to come up at some point, and I've seen a few people mention it already, but how does WarGear handle the dice and what number is rolled?  WF had some information (somewhere) on its RNG (or whatever it is called), I wouldn't mind seeing something simple just to please the masses (myself included).

    At your convenience tom or whoever comes up with the logic.

    Thanks!

    Yertle is here.

  2. #2 / 46
    They see me rollin' IRoll11s
    Rank
    Private
    Rank Posn
    #1535
    Join Date
    Nov 09
    Location
    Posts
    632

    I was going to start my own thread about randomness so good timing. Wanted to mention a few things.

    There was the inital placement of units that was blindingly obviously not random, although I think I read that this was changed sometime in the past few days.

    A case could be made for not having a completely random initial country selection as long as the whatever is used is not deterministic. Some tweaks to prevent any one person starting with an entire large continent bonus might be worthwhile.

    Another area of randomness is which card you are awarded, and I have enough personal anecodal evidnce that there is something wrong with this as well. I've only played in at most 2 dozen games, and I've had 2 wild cards at the same time at least 6 times, maybe as any as 10 times. In my 200+ games on WF I've had double wilds about the same amount of times.

    Since I've gotten most of the double wilds early in the game, I suspect that the probability to get a wild card is being treated as the same as one of the other 3 types.

    As far as the dice rolls I haven't seen anything that would make me question its randomness. I've had the typical game or two where I couldn't win a roll, and a few games where I couldn't lose.

    I'm not sure if tom wants to make it public but he told me what RNG method he was using, it's a very common server language based RNG generator that really doesn't have any ways you can get it wrong in terms of he randomness, the only errors possible are with the inputs (like I suspect with the cards).

    Of course I could be wrong about the cards, probabilities are funny that way.


  3. #3 / 46
    Moderator...ish. Cramchakle
    Rank
    Private
    Rank Posn
    #3023
    Join Date
    Nov 09
    Location
    Posts
    1182

    I, on the other hand, 11s, have yet to see a wild.

    Compromise is for when you're wrong and you know it.

  4. #4 / 46
    Premium Member Yertle
    Rank
    Major General
    Rank Posn
    #21
    Join Date
    Nov 09
    Location
    Posts
    3997

    IRoll11s wrote:
    I'm not sure if tom wants to make it public...

    IMO, he might as well (and have it in the Help).  I believe Steven received numerous reports that his RNG was bugged, it would be a lot easier pointing people to a Help area than explain it each time (some might even find that before emailing him).

    Yertle is here.

  5. #5 / 46
    Major General asm asm is offline now
    Standard Member asm
    Rank
    Major General
    Rank Posn
    #20
    Join Date
    Nov 09
    Location
    Posts
    1686

    IRoll11s wrote: As far as the dice rolls I haven't seen anything that would make me question its randomness. I've had the typical game or two where I couldn't win a roll,

    Agree

    and a few games where I couldn't lose.

    Disagree.

     

    As I recall, Steven actually went through a whole discussion as well as a little code-tweaking with some of you math whizzes way back when.


  6. #6 / 46
    Commander In Chief tom tom is offline now
    WarGear Admin tom
    Rank
    Commander In Chief
    Rank Posn
    #762
    Join Date
    Jun 09
    Location
    Posts
    5651

    I'm happy to discuss this stuff, the more open it is the more everyone has confidence in the system (or not!)

    The RNG that's used is built into PHP: http://php.net/manual/en/function.mt-rand.php

    So, a 6-sided dice roll is calculated by calling mt_rand(1,6) which generates a random number between 1 and 6.

    Now cards are a slight bodge because it's not simulating a 52-card deck of cards, the reason I didn't do this is because it's kind of tricky when you have a rule option like unlimited cards and then you have to worry about actually running out of cards in the deck. Here is the function that's used, it just generates a random number from 1 to 53 then gives you a card based on the proportion of cards in the deck:

    $cardnum = mt_rand(1, 53);
    if ($cardnum <= 17) return "A";
    if ($cardnum <= 34) return "B";
    if ($cardnum <= 51) return "C";
    else return "W";


    So in theory you could get 5 wildcards being held at one time in a game which would be impossible with a real deck of cards.

    In future I could look at using random data from an external source like http://random.org as this is based on atmospheric noise and is supposed to be about as random as you can get.

    Edited Wed 25th Nov 18:12 [history]

  7. #7 / 46
    Standard Member Ender
    Rank
    Private
    Rank Posn
    #526
    Join Date
    Nov 09
    Location
    Posts
    42

    The only thing in nature that I know to be truly random is the digits of Pi. If/when mathematicians figure out some non-random pattern within 3.14159..... it would have the potential to change math forever!

    How you would actually get a computer program to call a random digit in the string of Pi I have no idea.

    I would recommend that people who are interested in randomness read: http://www.random.org/analysis/

    Its kinda crazy but the sequence 1 1 1 1 1 1 does not prove that a generator isn't random.

    Practically speaking, for issues of dice rolling, why does it matter? If a given game, if there is a statistically higher probability that 1s 3s & 5s are going to be rolled, then on offense we would probably suffer and defense would probably benefit... but we get our own chance to be on defense...

    TRUE STORY: My friends and I were playing risk in my parents basement the old fashion way, when one friend claimed to have "the worst luck" against another. Being geeks we need to test the theory. They started rolling 2 dice each and keep track in risk fashion... 1 and 1, 0 and 2, 2 and 0 or draw. It was crazy that person who felt like they had terrible luck actually was losing 50-100! It wasn't until somewhere around 300ish that things started to get closer to 50/50...

    I wonder if you could use chaos theory to truly guarantee that a computer program could not predict ITS OWN OUTCOME!

    Ender


  8. #8 / 46
    Premium Member Yertle
    Rank
    Major General
    Rank Posn
    #21
    Join Date
    Nov 09
    Location
    Posts
    3997

    Ender wrote:
    Practically speaking, for issues of dice rolling, why does it matter?

    I played an MMORPG for a few years and there was something considered a WII flag that would signify monsters attacking your player instead of other players, the Devs denied it for years and years and said it couldn't be possible, until they found that it somehow it linked to your profile ID and that you could indeed be attacked more than another player.  Ever since "RNGs" and such have made me a bit leery at times (even though I'm not all fancied up on my math).

    I remember reading that Steven had reports of his RNG being affected by the time of the day and etc., and while I believe they were false I do think he looked into them (this was a long while ago ;)). 

    So yes, it's not that big of a deal IMO if everyone is the same and has the same advantage/disadvantage (as long as everyone knows about it too), but if somehow someone does have a leverage due to something in the RNG, then that should be taken care of.

    Yertle is here.

  9. #9 / 46
    Standard Member Vataro
    Rank
    Sergeant
    Rank Posn
    #436
    Join Date
    Nov 09
    Location
    Posts
    574

    Yertle wrote:
    Ender wrote:
    Practically speaking, for issues of dice rolling, why does it matter?

    I played an MMORPG for a few years and there was something considered a WII flag that would signify monsters attacking your player instead of other players, the Devs denied it for years and years and said it couldn't be possible, until they found that it somehow it linked to your profile ID and that you could indeed be attacked more than another player.  Ever since "RNGs" and such have made me a bit leery at times (even though I'm not all fancied up on my math).

    I remember reading that Steven had reports of his RNG being affected by the time of the day and etc., and while I believe they were false I do think he looked into them (this was a long while ago ;)). 

    So yes, it's not that big of a deal IMO if everyone is the same and has the same advantage/disadvantage (as long as everyone knows about it too), but if somehow someone does have a leverage due to something in the RNG, then that should be taken care of.

    In FFXI, the RNG has been shown to correlate to the in-game clock. On a /random (which produces a number between 1-1000), people have been able to roll 990+ many many times in a row by simply timing when they input the command.


  10. #10 / 46
    Standard Member Hugh
    Rank
    Lieutenant General
    Rank Posn
    #13
    Join Date
    Nov 09
    Location
    Posts
    869

    I could not find any pages on WF's wiki regarding how the cards are randomly selected. My guess is that he simulated Risk.

    In a standard Risk deck there are 44 cards, 42 corresponding to each country and 2 wild cards. According to the Risk FAQ, the odds of having a set at 3 cards is 42% and at 4 cards is 81%.

    Here we have a (51/53)^2 probability of not getting a wild in the 1st two cards, and a (36/53) probability of not getting the required card on the 3rd card to make a set. 1 - (51/53)^2*(36/53) is about a 37% chance of having a set at 3 cards. That's a decent difference. At 4 cards, I get 68% on the set.

    In the Risk situation, drawing two consecutive wilds has probability (2/44)*(1/43) = .11%, whereas here we see (2/53)^2 = .14%. Not much difference, but we'd expect it to magnify into situations where more cards are involved.

    Anyway, there IS definitely a difference here. To what extent do we care if we all play by the same probability distribution? I don't have a strong opinion except that I think the ideal is to give control to the map designers (e.g. maybe you could have maps where you automatically have sets at 3 cards).

    -Hugh


  11. #11 / 46
    Premium Member Yertle
    Rank
    Major General
    Rank Posn
    #21
    Join Date
    Nov 09
    Location
    Posts
    3997

    Hugh wrote: (e.g. maybe you could have maps where you automatically have sets at 3 cards).

    I think Warlight has something like this, I think you can also break it down to where you need 4 (or however many you choose) of a card to have a set, which is kind of interesting.  Cards are one area where you can have some fun with potential game changing events, lift Fog and whatnot.

    Yertle is here.

  12. #12 / 46
    Standard Member Hugh
    Rank
    Lieutenant General
    Rank Posn
    #13
    Join Date
    Nov 09
    Location
    Posts
    869

    Ah, I forgot - WF uses, for the most part 18/18/18/2 (not 14/14/14/2) as a card distribution! Was this something the mapmaker could control?

    BTW tom - I do enjoy mathematical programming. If you would find a deck simulator based on parameters set by the mapmakers a pain to program, I would happily do it.

    As for pseudo-random number generators, they are imperfect, but not as imperfect as our perceptions of what randomness should produce :)

    -Hugh


  13. #13 / 46
    Premium Member Yertle
    Rank
    Major General
    Rank Posn
    #21
    Join Date
    Nov 09
    Location
    Posts
    3997

    Hugh wrote: Ah, I forgot - WF uses, for the most part 18/18/18/2 (not 14/14/14/2) as a card distribution! Was this something the mapmaker could control?

    Map maker's could only control what cards are given to a player and the discard pile at Start Up and it was still restricted to the 18/18/18/2 scale (meaning you couldn't give a Wild to 4 players).  I think you could essentially discard all the cards of A,B, and Wild and only have 18 Cs left in the draw pile at Start Up, but I assume after 18 cards are handed out then the whole deck gets reshuffled.

    Yertle is here.

  14. #14 / 46
    Standard Member RiskyBack
    Rank
    Colonel
    Rank Posn
    #105
    Join Date
    Nov 09
    Location
    Posts
    1190

    Hugh I bet your math really gets the ladies!

    Yertle yes, Warlight has a way to create different card distributions for map makers but that is partially because they have different cards (spy, Air Lift, Move Turn Up, Move Turn Down) and also because they have Team Cards so that you and your teammate share cards but only one person can cash the matches and it is 1st come since every game there is a form of BAO.

    Personally, I don't want Map Makers to have control over the randomness of card distribution. I like the options that we have here now. I would like to see different types of cards but I think that the randomness of the cards should stay as consistent as possible because it is just too hard for some of us to handle. I am actually quite good and statistics and probability but when making a map I don't look that deep into it. It just gives more opportunity for maps to be flawed in a way that can't be caught in a few test games.

    I also agree that if we are all playing by the same rules all is good as far as mathmatically induced randomness. Yes, I'd like the RNG to be as advanced and cool as possible but I am not gonna start thinking about it too much. Do I suck at playing because of the RNG or because I often take chances to go for a quick elim because I think it's fun. Prolly the latter no matter which RNG is being used.

    P.S. I really hate when people in RL tell me stories about how they saw a person in the mall that they haven't seen for a few years and then say "How random is that?". IT'S NOT RANDOM AT ALL! The use of "Random" and "Ironic" should only be used by people who have a card allowing them to do so and that was given to them only after a battery of tests to be sure they are used correctly. Alanis Morisett ruined it for the general public.....stoopid Canadians!

    When Life Hands You Lemons, Find Someone to Throw them at!

  15. #15 / 46
    Standard Member Hugh
    Rank
    Lieutenant General
    Rank Posn
    #13
    Join Date
    Nov 09
    Location
    Posts
    869

    Thanks Risky! My gf might be the only one who truly appreciates my nerdy love for math, but I always wonder how "You know I have a PhD in math" would work at the bars. Probably not well, but I like to fantasize :) I too hate it when I hear "What are the odds?" in real life. -H


  16. #16 / 46
    Commander In Chief tom tom is offline now
    WarGear Admin tom
    Rank
    Commander In Chief
    Rank Posn
    #762
    Join Date
    Jun 09
    Location
    Posts
    5651

    Hugh wrote:

    BTW tom - I do enjoy mathematical programming. If you would find a deck simulator based on parameters set by the mapmakers a pain to program, I would happily do it.


    That would be great if you are up for it Hugh!

    Perhaps we can discuss first what card distribution options should be available... what do you guys think? At this stage of things however I don't want to introduce more radical stuff like airlift / airstrike etc, there's other higher priority things on the todo list.


  17. #17 / 46
    Premium Member Yertle
    Rank
    Major General
    Rank Posn
    #21
    Join Date
    Nov 09
    Location
    Posts
    3997

    I prefer the 0%/100% Probability Rule, everything is either 0% or 100%, there's nothing in between {#emotions_dlg.razz}

    Yertle is here.

  18. #18 / 46
    Standard Member Hugh
    Rank
    Lieutenant General
    Rank Posn
    #13
    Join Date
    Nov 09
    Location
    Posts
    869

    tom wrote:

    That would be great if you are up for it Hugh!

    I absolutely am!  I'd need to know what language you use, some syntax for math, arrays and random number function calls, and I'm confident I'd have fun with it.

    As you say, getting some ideas and starting easy might be best.  One way that would offer a lot of flexibility and still remain simple is to have 4 types of cards (one wild), have a default, say 18/18/18/2 like WF, and then the mapmaker could alter how many of each type of card.  This would allow automatic sets at 3 (by using x,0,0,0).  Separate function calls could calculate probabilities to give transparency to both map maker and to players.

    Looking to more complex options (perhaps for the future)  - we never question the forced turn-in at 5, the forced in-play turn-in at 6, or even the 3-set itself.  These seem to me to provide excellent play and balance, but you never know.  Perhaps these parameters could be altered for a different effect.

    -Hugh


  19. #19 / 46
    Standard Member paulharrow
    Rank
    Captain
    Rank Posn
    #267
    Join Date
    Nov 09
    Location
    Posts
    134

    Last week I was playing Risk with my daughter using a real board and dice. She was defending with 1 man and I had about 15 attacking. I did not manage to get the territory from her. In 12 rolls, she rolled ten 6's and two 5's. We were using the dice with the rounded corners that roll really well, so no chance of her cheating. I was furious!!!!


  20. #20 / 46
    Commander In Chief tom tom is offline now
    WarGear Admin tom
    Rank
    Commander In Chief
    Rank Posn
    #762
    Join Date
    Jun 09
    Location
    Posts
    5651

    Hugh wrote:

    I absolutely am! I'd need to know what language you use, some syntax for math, arrays and random number function calls, and I'm confident I'd have fun with it.

    As you say, getting some ideas and starting easy might be best. One way that would offer a lot of flexibility and still remain simple is to have 4 types of cards (one wild), have a default, say 18/18/18/2 like WF, and then the mapmaker could alter how many of each type of card. This would allow automatic sets at 3 (by using x,0,0,0). Separate function calls could calculate probabilities to give transparency to both map maker and to players.

    Looking to more complex options (perhaps for the future) - we never question the forced turn-in at 5, the forced in-play turn-in at 6, or even the 3-set itself. These seem to me to provide excellent play and balance, but you never know. Perhaps these parameters could be altered for a different effect.

    -Hugh

    The language is PHP, if you don't know it I can easily translate from any C-like language that you are familiar with. As per the above mt_rand is the best function to use, it generates a random number between min and max and is self-seeding.

    There is already a rule option for max allowed cards, this can be a number from 5 to unlimited so you would need to take account of this.

    I like the sound of the basic allocation distribution you've suggested...


You need to log in to reply to this thread   Login | Join
 
Pages:   123   (3 in total)