Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested foreach entries calculate probabilities incorrectly #7

Open
akarnokd opened this issue Jul 30, 2020 · 1 comment
Open

Nested foreach entries calculate probabilities incorrectly #7

akarnokd opened this issue Jul 30, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@akarnokd
Copy link
Owner

akarnokd commented Jul 30, 2020

Example: https://akarnokd.github.io/rng-76/chances.html?patch=P20&nocoalesce&formids=002C5DEB-003D7F95-0033AB36

☢ WEAP:0008E736 <BaseballBat> "Simple" | 4.167% | 15.596%

The parent says LLV_Vendor_Weapon_Melee_Faction_Responders x 4, the child LL_Weapon_Melee_BaseballBat calculates 15.654% because of the power rule, but the child still uses the flat 4.167%.

@akarnokd akarnokd added the bug Something isn't working label Jul 30, 2020
@akarnokd
Copy link
Owner Author

akarnokd commented Jul 30, 2020

Another example:

https://akarnokd.github.io/rng-76/chances.html?patch=P20&nocoalesce&formids=002C5DEB-003D7F7F-0011A36A

  • LLV_Vendor_Armor_Faction_Responders x 6 (100%)
    • LL_Armor_Underarmor_Generic (33% by the list itself), (1 - (1 - 1/3)^6) = 0.912208
      • Armor_RaiderMod_Underarmor_LongJohns "Mk5" (20% by the entry itself), should be around 33.9%

This last should calculate as 1 - (1 - 1/3 * 1/5)^6 = 33.8907

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant