I need a probability calculation script that works with various dice and dice pool sizes, that accounts for a mechanic that allows you to reroll up to X dice that are failures, but ONLY once per die. For example, if your dice pool is 5d10, and you roll four successes, you only get one reroll no matter how many rerolls you actually have. Essentially, I am trying to determine if a "limited" rerolls mechanic could be considered equivalent in usefulness compared to directly increasing your dice pool, or if there is a significant difference in the power level of these two mechanics.
This should be fairly simple for the right person, but I am no good at probability nor at using Troll or Anydice, so here I am. Thanks in advance.
Best Answer
Rerolls are almost always identical to just adding dice.
The only time that rerolls would not be taken as just being additional dice is, to my knowledge, in only two cases: when enough dice succeed to prevent all the rerolls from being used, or when there are too few original dice to make the rerolls practical. If you can reroll failures again, this becomes less significant, but even then you're still doing not much more than doing the addition process again.
I even wrote a script to test this, if you feel like giving it a whirl. In some rare cases it might be possible to game the mechanics to do something other than just adding dice (I'm an English Education major, so take that with a grain of salt), but at that point you'd be designing a mechanic around creating interesting probabilities rather than making a game that rewards rerolls.
You could experiment with using modifier on rerolls or original results, which would produce results distinct from just adding a die, or using different dice, but I don't think that's what you intended.
Rerolls become less meaningful when the target number is low and when the reroll pool is large relative to the total of dice, and are more meaningful when you have a high target number and/or lots of dice. Each subsequent reroll opportunity is exponentially less valuable than the one before it.