1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Infinity Dice Calculator

Discussion in 'News' started by toadchild, Dec 5, 2017.

  1. Nuada Airgetlam

    Nuada Airgetlam Nazis sod off ///

    Joined:
    Jan 26, 2018
    Messages:
    3,071
    Likes Received:
    3,019
    Paralysing ammo, basically taser, iirc.
     
    Mob of Blondes likes this.
  2. colbrook

    colbrook Grenade Delivery Specialist

    Joined:
    Nov 23, 2017
    Messages:
    9,301
    Likes Received:
    17,079
    Adhesive weapons use Para ammo too
     
    Mob of Blondes likes this.
  3. ijw

    ijw Ian Wood aka the Wargaming Trader. Rules & Wiki
    Infinity Rules Staff Warcor

    Joined:
    Apr 25, 2017
    Messages:
    7,334
    Likes Received:
    14,822
    jherazob and Mob of Blondes like this.
  4. zapp

    zapp Well-Known Member

    Joined:
    Nov 27, 2017
    Messages:
    723
    Likes Received:
    1,312
    How is the data in that bitbucket repo optained? Do you get it from CB in some automated way or is it maintained by hand?
    I'm not sure if I can help much on the Perl/C part of the project, but I can certainly help typing in unit profiles or lists of hacking devices, weapons and so on.
    (But I really hope there is some kind of API to get the unit profiles data from army)
     
  5. toadchild

    toadchild Premeasure

    Joined:
    Feb 22, 2017
    Messages:
    4,262
    Likes Received:
    8,073
    The current version uses the same data as MayaNet, which is JSON that I was copying by hand from official release sources. There are instructions in the dice repository for how to set that up. For N4, I plan to rewrite the data importer to be able to load directly from Army.
     
    jherazob likes this.
  6. QueensGambit

    QueensGambit Chickenbot herder

    Joined:
    Jan 31, 2019
    Messages:
    2,213
    Likes Received:
    3,456
    I'm totally down this rabbit hole and am making a monstrous hacked-together N4 dice calculator to get me through until @toadchild does it properly.

    I have the first part done, without any of @toadchild 's math skills it uses pure brute force, which means that to do a F2F with the highest possible burst (5 active B, 4 reactive B) it has to crunch 512 billion rolls. But for more reasonable F2Fs (e.g. 3 B to 1) the brute-force method seems to be working fine.

    For @toadchild or anyone else who maths: if a unit takes n armour saves, and each save has p probability of failure, is there a formula for calculating the probability that the unit will fail at least x saves? (My math is good enough to calculate it for x=0 and x=1, but after that I'm lost).
     
    jherazob likes this.
  7. Mob of Blondes

    Mob of Blondes Well-Known Member

    Joined:
    Nov 24, 2017
    Messages:
    1,234
    Likes Received:
    1,335
  8. Mahtamori

    Mahtamori Well-Known Member

    Joined:
    Nov 23, 2017
    Messages:
    12,030
    Likes Received:
    15,320
    It's a binomial distribution. Can't give you the TLDR of how to solve it, I haven't used those since university and that was 15 years ago, but should be a good start to google for it.

    Basically, sum of (p^x)*((p^(x-n))) for n=n+1 until n=x should do it I think
     
    toadchild and QueensGambit like this.
  9. colbrook

    colbrook Grenade Delivery Specialist

    Joined:
    Nov 23, 2017
    Messages:
    9,301
    Likes Received:
    17,079
    I stumbled across a test page shortly after the C1 wiki launched that had a toggle at the top of the page to switch between C1 and N4.
     
    Abrilete and Mob of Blondes like this.
  10. toadchild

    toadchild Premeasure

    Joined:
    Feb 22, 2017
    Messages:
    4,262
    Likes Received:
    8,073
    That’s broadly how mine works; I just use a few tricks to recognize patterns and cut down on repeated evaluation of identical rolls (rolling 1,2 is the same as rolling 2, 1).
     
  11. ijw

    ijw Ian Wood aka the Wargaming Trader. Rules & Wiki
    Infinity Rules Staff Warcor

    Joined:
    Apr 25, 2017
    Messages:
    7,334
    Likes Received:
    14,822
    The plan is for them to be on the same wiki.
     
    Abrilete and Mob of Blondes like this.
  12. QueensGambit

    QueensGambit Chickenbot herder

    Joined:
    Jan 31, 2019
    Messages:
    2,213
    Likes Received:
    3,456
    Heh, your "just a few tricks" cut down on the rolls you need to crunch by 99.78% according to your stats readout, which is pretty good math as far as I'm concerned :-)

    In contrast, my test of brute-forcing 5B vs. 4B has been running for 1.5 hours so far...
     
    toadchild and jherazob like this.
  13. toadchild

    toadchild Premeasure

    Joined:
    Feb 22, 2017
    Messages:
    4,262
    Likes Received:
    8,073
    Source code is there if you want to look at it and I attempted to describe my optimizations from a higher lever perspective here: http://ghostlords.com/2014/06/infinity-dice-rolling-engine/
     
    zapp likes this.
  14. QueensGambit

    QueensGambit Chickenbot herder

    Joined:
    Jan 31, 2019
    Messages:
    2,213
    Likes Received:
    3,456
    Hideous N4 Interim Dice Calculator v.1 is complete!

    It runs pretty well for matchups up to 5 dice. 6 dice takes 5 minutes or so to process on my computer. 7 dice and up, forget it.

    I did a couple of tests for fun:

    Impact of crit change on high ARM: in N3, the fusilier Angus shoot at a Tikbalang in cover has a 25.1% chance to wound. In N4, that goes down to 17.4%.

    Impact of crit change on NWI light infantry: in N3, a Mukhtar murdering a helpless Ikadron has a 4.3% chance to suffer a wound. In N4, it's 2.9% to take a wound and 0.7% to take two wounds. That's not as bad as I expected - I thought the crit change would be worse for units like the Mukhtar who use their NWI primarily as a way to survive an unlucky crit.
     
    Alphz, Barrogh and ijw like this.
  15. ijw

    ijw Ian Wood aka the Wargaming Trader. Rules & Wiki
    Infinity Rules Staff Warcor

    Joined:
    Apr 25, 2017
    Messages:
    7,334
    Likes Received:
    14,822
    You might need to check your code for N4 Crits, it looks like the chance of wounding the Tikbalang is a percent or so too high. A single N4 Crit with Damage 13 vs ARM9 gives about 36% chance of causing 1+ wounds, and Crits made up nearly 14 percentage points of the N3 chance to wound in that situation.
     
  16. ijw

    ijw Ian Wood aka the Wargaming Trader. Rules & Wiki
    Infinity Rules Staff Warcor

    Joined:
    Apr 25, 2017
    Messages:
    7,334
    Likes Received:
    14,822
    Also, for the Mukhtar that looks like a Red Fury vs Pistol at 8-16” in Cover, in which case your N4 result is way off as most of the chance to wound the Mukhtar is from non-Crits!

    From Toadchild’s calculator:
    P2 Hits: 0 Crits: 1 - 4.07% (130321)
    P2 Hits: 1 Crits: 0 - 0.72% (23058)

    The good news is that a D11 Crit vs ARM4 is only 12% chance of 2W, so times the 0.72% chance of a Crit gives a tiny 0.9% chance of the Mukhtar suffering 2W.
     
  17. QueensGambit

    QueensGambit Chickenbot herder

    Joined:
    Jan 31, 2019
    Messages:
    2,213
    Likes Received:
    3,456
    @ijw I appreciate the troubleshooting help! For the Mukhar-Ikadron, I forgot a pistol is only DAM 11. Now I'm getting 2.6% to suffer 1 wound, and 0.5% to suffer two wounds.

    But I think you misread @toadchild's output? It says "Hits: 0 Crits: 1" has a 4.07% chance, and "Hits: 1 Crits: 0" has a 0.72% chance. I just checked, and those are the numbers mine is producing as well: 0.72% chance of the Ikadron hitting without critting, and 4.07% chance of the Ikadron critting. That's also about what you'd expect: the Ikadron has a 5% chance of rolling a crit, minus the odds that the Mukhtar also crits leaves just under 5% to crit.

    At 4.07% to crit, and 12% that the crit will cause two wounds, that's 0.49% overall to inflict two wounds. The Hideous Dice Calculator produced 0.50%, which seems right? The 0.01% discrepancy probably comes from rounding.

    Does that look right?

    I'm gonna look at the Angus/Tik fight in a sec.
     
    ijw likes this.
  18. QueensGambit

    QueensGambit Chickenbot herder

    Joined:
    Jan 31, 2019
    Messages:
    2,213
    Likes Received:
    3,456
    For Angus/Tik:

    I'm getting 24.97% for Angus to score one hit, no crits - correct per Toadchild's output.

    21.61% to score either two hits, or one crit (both will cause 2 saves so the HDC groups them together.) Also correct per Toadchild (7.53% + 14.08%)

    So it looks like I'm correctly counting the odds of inflicting x number of armor saves. Here's the complete data:

    Odds of active unit inflicting n ARM saves:
    1: 24.97%
    2: 21.61%
    3: 7.16%
    4: 1.73%
    5: 0.17%
    6: 0.01%

    From there I use a binomial formula to calculate the odds that n saves will cause x wounds, multiplied by the above odds of taking n saves, and sum the results to get the overall odds of causing x wounds.

    So it accords with Toadchild's results to the extent that I was able to check it, but there's a lot that I couldn't check. I'm not sure I followed your reasoning on the Angus/Tik fight, @ijw , could you explain further?
     
    ijw likes this.
  19. ijw

    ijw Ian Wood aka the Wargaming Trader. Rules & Wiki
    Infinity Rules Staff Warcor

    Joined:
    Apr 25, 2017
    Messages:
    7,334
    Likes Received:
    14,822
    Doh, yes I did. Sorry.

    Sure. This probably comes across as a weird way to work it out, but...

    N3, there's a 25.1% chance to wound. 14.26 percentage points of that come from N3 Crits (the odds of the Fusilier getting a Crit and the Tikbalang not getting a Crit).

    That leaves a 'fixed' 10.84 percentage points that's unaffected by changes to Crits, only the 14.26 percentage points change.

    With an N4 Crit, D13 vs ARM9 gives 36% chance of causing 1+ damage. So 14.26% chance of auto-wounding via a Crit becomes 36% * 14.26% = 5.13% chance of causing 1+ damage in N4.

    Add that back to the fixed non-Crit part and you've got 15.96% chance to damage the Tikbalang.


    It's quite possible that I've made an error in the percentage points that come from non-Crits and from N3 Crits*, but the N4 Crits should be causing damage 36% of the time compared to N3.

    *Thirty years since Pure Maths and Applied Maths is starting to show... :-(
     
  20. QueensGambit

    QueensGambit Chickenbot herder

    Joined:
    Jan 31, 2019
    Messages:
    2,213
    Likes Received:
    3,456
    Ok, I think I follow you! I'm getting slightly different numbers, though. From toadchild, the odds of Angus scoring at least one crit (with or without additional hits) is 7.53% + 0.50% + 0.01% + 4.11% + 0.17% + 1.22% = 13.54% (not 14.26%). Any of those results causes an automatic 1+ wounds in N3.

    The total odds of 1+ wounds in N3 is 25.1%. So 11.56% of that comes from rolls that don't include any crits. That 11.56% will be unchanged in N4.

    For the rolls that do include crits, in N4 the crits will only wound 36% of the time. 36% of 13.54% is 4.87%. There will also be a small percentage of wounds caused by non-crit hits (for example, in a roll with one crit and one hit, the crit will wound 36% of the time, but when it doesn't wound, the other hit will still occasionally wound).

    So the total odds to wound in N4 should be 11.56% + 4.87% + some small amount for non-crit wounds in the same roll as non-wounding crits. So 16.43% plus a bit.

    That seems consistent with my 17.41% result. But I could be missing something, especially since our starting numbers are different. How did you calculate 14.26%?
     
  • About Us

    We are a company founded in 2001 in Cangas (Spain), and devoted to design and manufacture games and figures. Our main product, Infinity the Game, was born with the ambition to satisfy the most demanding audience, offering the best quality.

     

    Why are we here?

     

    Because we are, first and foremost, players.

  • Quick Navigation

    Open the Quick Navigation