Zaq

2016-03-09, 02:51 PM

Hey everyone, would any of you be so kind as to help me figure out how to calculate something? I'm trying to figure out what the expected number of successes would be from a batch of dice that you can reroll once. (I'm playing around with AnyDice (http://anydice.com/program/4a06), but I'm not much of a programmer—I haven't done anything involving programming since I took computer science back in high school, which was about 12 or 13 years ago, so I'm really struggling to do anything beyond a single command.)

Basically, say you've got 6d6, and a success is a 6. Anything that isn't a 6 is a non-success and can be treated as identical. If you just roll that pile of dice once and count how many successes you've got, that's simple enough to make AnyDice do: http://anydice.com/program/4a06

But let's say that you've got 6d6 and you're looking for sixes. You can roll that 6d6, and then you can set aside any sixes you rolled and reroll everything that wasn't a success. How do I get AnyDice (or any other dice calculator) to tell me how many successes I can expect in a situation like that? (For the specific situation I'm looking at, it's most important for me to know how that would play out if I reroll once, but it also wouldn't hurt to know what would happen if I rerolled twice.)

Second question: say you've got the same situations, but now we care about 2 faces of the dice. If you roll a 6, that's a success. If you roll a 2, 3, 4, or 5, that's not a success, but it can be rerolled. But, if you roll a 1, that's a failure, and it cannot be rerolled. (It doesn't cancel out a success—it just gives you fewer dice to try to get successes with when you do reroll.) Can someone help me figure out how to make AnyDice (or, again, any other dice calculator) tell me how many successes to expect in a situation like that?

Ideally, I'd like to figure out how to set up a general case for this sort of thing (so that I can make AnyDice calculate different versions of a similar scenario, like how to make it work on 8d6 instead of 6d6, or how to make it work if you can reroll twice but keep the same rules for keeping ones and/or sixes). If you don't want to use AnyDice, I'm open to using any free dice calculator, and if you'd prefer to not use a calculator, I'll do my best to follow your explanation on how to do it by hand (I've never been math-phobic, but it's been a long time since I've needed to use anything other than everyday arithmetic or simple probability calculations like the expected value on a single batch of dice with no rerolls).

Part of what's making this hard is that I'm looking for successes rather than for numbers. I know how to calculate the expected value on 6d6, but I don't really know how to figure out what my odds are of having a given number of successes come up. (Which is one reason I want a dice calculator to do that for me, if possible.) Anyway, any help would be appreciated. Thanks!

Basically, say you've got 6d6, and a success is a 6. Anything that isn't a 6 is a non-success and can be treated as identical. If you just roll that pile of dice once and count how many successes you've got, that's simple enough to make AnyDice do: http://anydice.com/program/4a06

But let's say that you've got 6d6 and you're looking for sixes. You can roll that 6d6, and then you can set aside any sixes you rolled and reroll everything that wasn't a success. How do I get AnyDice (or any other dice calculator) to tell me how many successes I can expect in a situation like that? (For the specific situation I'm looking at, it's most important for me to know how that would play out if I reroll once, but it also wouldn't hurt to know what would happen if I rerolled twice.)

Second question: say you've got the same situations, but now we care about 2 faces of the dice. If you roll a 6, that's a success. If you roll a 2, 3, 4, or 5, that's not a success, but it can be rerolled. But, if you roll a 1, that's a failure, and it cannot be rerolled. (It doesn't cancel out a success—it just gives you fewer dice to try to get successes with when you do reroll.) Can someone help me figure out how to make AnyDice (or, again, any other dice calculator) tell me how many successes to expect in a situation like that?

Ideally, I'd like to figure out how to set up a general case for this sort of thing (so that I can make AnyDice calculate different versions of a similar scenario, like how to make it work on 8d6 instead of 6d6, or how to make it work if you can reroll twice but keep the same rules for keeping ones and/or sixes). If you don't want to use AnyDice, I'm open to using any free dice calculator, and if you'd prefer to not use a calculator, I'll do my best to follow your explanation on how to do it by hand (I've never been math-phobic, but it's been a long time since I've needed to use anything other than everyday arithmetic or simple probability calculations like the expected value on a single batch of dice with no rerolls).

Part of what's making this hard is that I'm looking for successes rather than for numbers. I know how to calculate the expected value on 6d6, but I don't really know how to figure out what my odds are of having a given number of successes come up. (Which is one reason I want a dice calculator to do that for me, if possible.) Anyway, any help would be appreciated. Thanks!