4
\$\begingroup\$

I'm having a hard time coding an anydice script to show what I want.

Let me contextualize the mechanic I'm trying to simulate:

You roll a POOL of d10 against a TARGET number. If at least one die from the POOL is equal to or higher than the TARGET, the roll is a success. The count of such dice is the degree of success, but that isn't my focus at the moment.

I'd like to have a graph for the chances of success of various POOLs of different sizes up to 10 (1d10, 2d10, 3d10...10d10) against different TARGETs from 2 to 10 (2, 3, 4... 10).

The caveat is: I'd like the graph to be layed out in such a way that:

  • the x axis represents the TARGETs;
  • the y axis represents the chances of at least 1 success;
  • each line represents a POOL,

so I can see the chances that each POOL has to succeed against a whole range of TARGETs.

Can any anydice wizard help me with this, please?

\$\endgroup\$
0

1 Answer 1

3
\$\begingroup\$

You want the chance the highest value of a pool is at least x

We only need to look at the value of the highest result in the pool. If it's higher than the target we have at least one success, and if it's less, none of the others can be higher either and thus we have no successes. So we only need the chance that the highest value is at least our target.

You can obtain the highest value of a dice pool by retrieving the first value: 1@Nd10. You can then loop over your relevant dice pools. Choose the graph view and At Least data type. This will graph it with a line for each pool as can be seen in Anydice here from the following code:

loop N over {1..10} {
   output 1@Nd10 named "[N]d10"
}

Exporting the data and using a different plotting tool (in part as Anydice only has 8 colours and thus repeat two of them), we obtain the following graph (it's the same graph, I just think this is a prettier render):

plot of probability that one of the dice of a pool is at least x

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .