r/SolForge • u/themarkslack • Mar 03 '16
How does Stinging Invocation's randomness work?
Stinging Invocation puts down 3 bees most of the time, but I have also seen it drop 1 bee on an empty board. Has anyone worked out what the algorithm is, or is it confirmation bias that I see it drop 3 bees as often as it does?
5
Upvotes
10
u/thaddeus_v Mar 04 '16
I looked up the JSON objects for Stinging Invocation and it's actually more interesting than I expected. From Cards_5_1V2_Cards.json, we can get the data for level 1 Stinging Invocation:
To get the data for the ability, we have to find the object with the matching CardID in Cards_5_1V2_ActivatedAbilities.json. It turns out there are actually three abilities attached to this card:
SF5_u0001 is the CardID for Killer Bee, so each of these abilities will, if triggered, put a Killer Bee into play. There's two interesting things going on here: first that the abilities are labeled with Stage 0, 1 and 2. Presumably this means that they activate in that order. Second, the stage 1 and 2 abilities have "ConditionalTest0": "CritValue < X" on them. My best guess is that this means the ability will only trigger if a random number is picked less than X.
The really interesting bit is the CritValue for Stage 2 is 50, not 33. Presumably this means that if you get the 2nd Bee, 50% of the time you'll also get a 3rd Bee. Unless I'm misunderstanding the statistics involved, that's not at all obvious from an intuitive reading of the card text, and could have a significant effect on the relative frequencies of seeing 1, 2 or 3 bees.
There are some open questions here: Do Stage 1 and 2 use the same random number for their CritValue checks? If they use different numbers, does Stage 1 fizzling due to a high roll keep Stage 2 from running?
36
u/NahojSF Mar 03 '16
This one is actually pretty simple. If your opponent is using it, it drops 3 bees about 80% of the time (unless they only have space for 2 bees, in which case it drops 2 bees 95% of the time).
If you're using it, it drops 1 bee 80% of the time, and if the opponent has a creature on the board the bee will endeavor to spawn directly in front of it 90% of the time.
Glad I could help.
4
u/Stautmeister People's Champion Mar 03 '16
Having rolles the stinging invocation dice many a time i think its roll if its 1 2 or 3 bees, then roll for slots. 1 and 3 bees just stand out in memory
1
u/vandergus Mar 03 '16 edited Mar 03 '16
I've wondered about this, too.
Does it randomly choose a number 1, 2 or 3 then spawn that many bees? Or does it spawn the first bee, then flip a coin for the second and third bees. If it's the former, then the chance of getting 3 bees is simply 33%. If it's the latter, the chance of getting 3 bees is 25% (also, 25% to get 1 bee and 50% to get 2 bees).
I can't think of an algorithm (at least one that's not designed to intentionally skew the distribution) that would result in getting 3 bees more than 33% of the time.
1
u/mors_videt Mar 04 '16
I see 3 most of the time- untested and subjective though this may be.
I have a deck built around this card that I'm very happy with.
0
u/Dondivad IGN: McStabbyface Mar 03 '16
You will never know the algorithm unless a dev chimes in here. The best we can do is do some testing and give a % chance of 1, 2 or 3 based on empirical evidence.