"Simulate Variance" in dxcalc

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • "Simulate Variance" in dxcalc

      I've added an option in dxcalc to simulate variance to mimic the way the game does. It's a checkbox at the bottom of the page as shown below. It's kind of fun to just click submit and watch the "HP lost" and sometimes number of rounds change. I will go ahead and explain some of how it's implemented and then comment on some unknowns. If I get information that conflicts with what it's currently doing from Freezy or someone like that from Bytro I'll update it.



      For each stack in each round of battle a random number between 0.8 and 1.2 is generated. The chance is greater that that number is closer to 1.0 than to the extremes. The following plot shows how this weighting is done. It's a normal distribution with mean = 1.0 and standard deviation = 0.1. For a given stack in a given round the damage potentials against all class types are multiplied by this random number. For example, if the value is say 0.85 then the unarmed and light armored damage potentials are both multiplied by 0.85 for that stack in that round.



      There are a few things I'm not sure about.

      1. What standard deviation does the game server actually use? I would imagine it isn't greatly different than what I'm using here, but it could be smaller for example. If it was smaller then the change in damage potential wouldn't be as great on average.

      2. At what points are new random values generated? I think how I am currently doing this seems reasonable but there are very many possible alternatives/permutations. For example, instead multiplying all the damage classes by the same random value one could generate a new random value for each damage class in each stack. This could be broken down even further so that you select a random value for each damage class of each unit in each stack, etc. It would be nice to know exactly how this is implemented.
    • DxC wrote:

      I've added an option in dxcalc to simulate variance to mimic the way the game does. It's a checkbox at the bottom of the page as shown below. It's kind of fun to just click submit and watch the "HP lost" and sometimes number of rounds change. I will go ahead and explain some of how it's implemented and then comment on some unknowns. If I get information that conflicts with what it's currently doing from Freezy or someone like that from Bytro I'll update it.



      For each stack in each round of battle a random number between 0.8 and 1.2 is generated. The chance is greater that that number is closer to 1.0 than to the extremes. The following plot shows how this weighting is done. It's a normal distribution with mean = 1.0 and standard deviation = 0.1. For a given stack in a given round the damage potentials against all class types are multiplied by this random number. For example, if the value is say 0.85 then the unarmed and light armored damage potentials are both multiplied by 0.85 for that stack in that round.



      There are a few things I'm not sure about.

      1. What standard deviation does the game server actually use? I would imagine it isn't greatly different than what I'm using here, but it could be smaller for example. If it was smaller then the change in damage potential wouldn't be as great on average.

      2. At what points are new random values generated? I think how I am currently doing this seems reasonable but there are very many possible alternatives/permutations. For example, instead multiplying all the damage classes by the same random value one could generate a new random value for each damage class in each stack. This could be broken down even further so that you select a random value for each damage class of each unit in each stack, etc. It would be nice to know exactly how this is implemented.
      I think that Mr. suntso might know about it already or at least he know method because he has the technology to scrape the source code.
    • Now that this random deviation seems to have a big effect on the battle, maybe you could simulate the battle ten times for each request, and present the average result?
      When the fake daddies are curtailed, we have failed. When their roller coaster tolerance is obliterated, their education funds are taken by Kazakhstani phishers, and their candy bars distributed between the Botswana youth gangs, we have succeeded.
      - BIG DADDY.
    • jubjub bird wrote:

      The average result should be basically the same as the variance-free result.
      yep


      jubjub bird wrote:

      Maybe instead simulate it multiple times and chart win percentage or the range of health remaining
      That could be useful. For now you can just click it several times to get a pretty good idea of possible outcomes. You could also use the "New Tab" option to save the various iterations in different tabs.
    • DxC wrote:

      2. At what points are new random values generated? I think how I am currently doing this seems reasonable but there are very many possible alternatives/permutations. For example, instead multiplying all the damage classes by the same random value one could generate a new random value for each damage class in each stack. This could be broken down even further so that you select a random value for each damage class of each unit in each stack, etc. It would be nice to know exactly how this is implemented.
      I now have some evidence that addresses this question. It seems that the last option here "This could be broken down even further so that you select a random value for each damage class of each unit in each stack" is the correct one.