8
\$\begingroup\$

In the Psionic Options UA all the subclasses get access to a Psionic Talent Die that works as follows:

Changing the Die’s Size. If you roll the highest number on your Psionic Talent die, it decreases by one die size after the roll. This represents you burning through your psionic energy. For example, if the die is a d6 and you roll a 6, it becomes a d4. If it’s a d4 and you roll a 4, it becomes unusable until you finish a long rest.

Conversely, if you roll a 1 on your Psionic Talent die, it increases by one die size after the roll, up to its starting size. This represents you conserving psionic energy for later use. For example, if you roll a 1 on a d4, the die then becomes a d6.

Whenever you finish a long rest, your Psionic Talent die resets to its starting size. When you reach certain levels in this class, the starting size of your Psionic Talent die increases: at 5th level (d8), 11th level (d10), and 17th level (d12).

My question is, for each die, how many rolls of this die would you expect before being unable to use it any further? I would like to see this analysis for all the die sizes mentioned above, in addition to a d4.

An excellent answer may provide the distributions of the number of times the die can be rolled before becoming unusable, and/or an anydice analysis of this problem.

This question may be useful.

\$\endgroup\$
2
16
\$\begingroup\$

The psionic power die is a discrete-time Markov chain whose states correspond to the size of the die, as well as an absorbing state (the power die is exhausted). The Markov chain is governed by a stochastic matrix \$P\$, where element \$P_{i,j}\$ is the probability of going from die \$i\$ to die \$j\$ in one use of the power die. For the d8 case, \$P\$ looks like: $$ P = \begin{pmatrix} \frac{7}{8} & \frac{1}{8} & 0 & 0 \\ \frac{1}{6} & \frac{4}{6} & \frac{1}{6} & 0 \\ 0 & \frac{1}{4} & \frac{2}{4} & \frac{1}{4} \\ 0 & 0 & 0 & 1 \end{pmatrix}, $$ where rows represent the current die and columns the next die (both in descending order from largest to small die, with the absorbing state at the end). Note that the rows sum to one (for a given current die size, all possible die sizes after the next roll must have total probability of 1), and that the last row (the no-die row) is absorbing: once the chain enters this state, it never leaves (at least until the psion rests!).

To compute the distribution of the number of rolls until we exhaust the power die, we look at the upper-left block of the \$P\$ matrix (i.e., the part of the matrix that governs transitions among non-absorbing states). We'll call this submatrix \$T\$. For the d8 case, this is just: $$ T = \begin{pmatrix} \frac{7}{8} & \frac{1}{8} & 0 \\ \frac{1}{6} & \frac{4}{6} & \frac{1}{6} \\ 0 & \frac{1}{4} & \frac{2}{4} \end{pmatrix}. $$

Further, we know that the psionic die begins in the largest die, which means we can describe the initial probability for each non-absorbing state with a (row) vector of probabilities for each state, \$\pi\$; for example, in the d8 case, \$\pi = \{1, 0, 0\}\$. Finally, the probability of going from die \$i\$ to the absorbing state is described by the (column) vector \$T_0 = \{0, 0, \frac{1}{4}\}\$ (again in the d8 case).

The probability that the chain enters the absorbing state on roll \$k\$ can be computed as: $$ P(k) = \pi T^{k - 1} T_0. $$

For d4 through d12, these distributions look like this (note that the x-axis is on the log scale: these distributions are quite broad!): PMF of the last psionic die

This also allows us to compute various summaries of the number of rolls before the psionic power die is lost: \begin{array}{c|l|l|l} \textbf{Die} & \textbf{mean} & \textbf{median} & \textbf{mode} & \textbf{95% probability interval} \\ \hline d4 & 4 & 2 & 1 & [1, 10] \\ d6 & 16 & 11 & 4 & [2, 43] \\ d8 & 40 & 29 & 11 & [3, 108] \\ d10 & 80 & 58 & 22 & [5, 217] \\ d12 & 140 & 103 & 39 & [8, 380] \end{array}

Psionic Replenishment

Following from @wereslug's answer, we can extend the Markov chain model to include Psionic Replenishment if we assume the psion uses the ability as soon as they reach a d4. To do so, we include whether the Psionic Replenishment has been used as part of the state of the chain. We can subscript the size of the die with 0 if replenishment has not been used, and 1 if it has been used. For example, if the psion is currently on a d8 and has used replenishment, they are in state \$d8_1\$, and if they are currently on a d6 but have no used replenishment, then they are in state \$d6_0\$.

We can apply the same theory as above with the new state-space, but with "failures" in the \$d6_0\$ state leading to transitions to \$dM_1\$ (where M is the maximum die size); we can exclude \$d4_0\$ because we never actually visit it. For example, in the d8 case, the state space (without the absorbing state) is \$\{8_0, 6_0, 8_1, 6_1, 4_1\}\$. The matrix \$T\$ in the d8 case is: $$ T = \begin{pmatrix} \frac{7}{8} & \frac{1}{8} & 0 & 0 & 0 \\ \frac{1}{6} & \frac{4}{6} & \frac{1}{6} & 0 & 0 \\ 0 & 0 & \frac{7}{8} & \frac{1}{8} & 0 \\ 0 & 0 & \frac{1}{6} & \frac{4}{6} & \frac{1}{6} \\ 0 & 0 & 0 & \frac{1}{4} & \frac{2}{4} \end{pmatrix}, $$ and corresponding changes to \$\pi = \{1, 0, 0, 0, 0\}\$ and \$T_0 = \{0, 0, 0, 0, \frac{1}{4}\}\$.

The resulting distributions and summaries are: enter image description here

\begin{array}{c|l|l|l} \textbf{Die} & \textbf{mean} & \textbf{median} & \textbf{mode} & \textbf{95% probability interval} \\ \hline d4 & 4 & 2 & 1 & [1, 10] \\ d6 & 22 & 17 & 11 & [3, 50] \\ d8 & 62 & 52 & 34 & [8, 139] \\ d10 & 132 & 112 & 75 & [18, 293] \\ d12 & 240 & 205 & 138 & [33, 531] \end{array}

\$\endgroup\$
1
  • 1
    \$\begingroup\$ I think this answer assumes the Psionic Replenishment feature can't be used after rolling a 4 on a d4 expends the die, which has been confirmed by a developer tweet not to be the intended interpretation. I don't have a link to hand right now, but will share it when I can. \$\endgroup\$ – LizWeir Apr 22 '20 at 9:12
9
\$\begingroup\$

Many

This kind of problem is better suited to simulations, rather than AnyDice. The base principle; make a program which rolls dice according to our rules and counts how many rolls it gets to do before it stops. Have it try many, many times. If you have enough runs (I used 1 million), your data is probably representative. Do this in your favourite, suited programming language, which for me is Python:

import _random
import math

rnd = _random.Random()
def getrandint(m):
    return math.ceil(rnd.random()*m)


def rollpsidice(d):
                  #d is our current die, starts as the die size we want to test
    rolls = 0     #counter for how many rolls we made
    dmax = d      #storing how large our dice can become
    while d > 2:  #repeat until we've downgraded from a d4
        r = getrandint(d)      #make our new roll r
        if r < 1 or r > d:
            print("Something is wrong with r:", r)
        if r == d:     #test if we downgrade our die
            d-=2
        elif r == 1 and d < dmax:     #test if we upgrade our die
            d+=2
        rolls+=1

    return rolls

#res = rollpsidice(8)
#print(res)

def simPsiDice(dice, file_name, runs=100000):
    f = open(file_name + ".txt", "a")
    for i in range(runs):
        f.write(str(rollpsidice(dice)) + "\n")
    f.close()

simPsiDice(12, "simpsiout_12_1m", 1000000)
print("Done")

Which gives a bunch of tries, which when tallied gives the following probability distributions:

For a d6:

distribution of d6 psi dice

For a d8:

distribution of d8 psi dice

For a d10:

distribution of d10 psi dice

For a d12:

distribution of d12 psi dice

From these we can also get the average number of rolls we get to do with any one size of die:

\begin{array}{c|l} \textbf{Dice} & \textbf{Average number of rolls}\\ \hline d6 & 15.998\\ d8 & 40.021\\ d10 & 80.104\\ d12 & 140.0582 \end{array}

\$\endgroup\$
0
9
\$\begingroup\$

EDIT: Forgot about the Psi Replenish rules. Fixed.

Getting the mean for this problem analytically can be done by summing infinite series.

When rolling a d6 psionic die, the probability of going down to a d4 on a particular die roll n is

$$\frac{1}{6}\left(\frac{5}{6}\right)^{n-1}$$

That is, it's the probability of rolling a 1 multiplied by the probability of having not already rolled a 1 previously. So, the expected number of rolls before going to the d4 (E(d6↓d4)) is:

$$E(d6\downarrow d4) = \sum_{n=1}^\infty n \left(\frac{1}{6}\left(\frac{5}{6}\right)^{n-1}\right)=6$$

When rolling the d4 psionic die, the probability of rolling a 1 on a particular roll n and the probability of going back up to a d6 are both:

$$\frac{1}{4}\left(\frac{3}{4}\right)^{n-1}$$

So, given that we know the number of expected rolls before we return to a d4, we can write the expected number of rolls at the d4 level as:

$$E(d4) = \sum_{n=1}^\infty n\left[\frac{1}{4}\left(\frac{3}{4}\right)^{n-1}\right] + E(d6\downarrow d4) \left[\frac{1}{4}\left(\frac{3}{4}\right)^{n-1}\right]=4+6 = 10$$

Therefore, the expected number of Psionic Die rolls starting at d6 is

$$E(d6) = E(d6\downarrow d4) + E(d4) =6+10=16$$

The same logic applied to d8, d10, and d12 gives a generalized answer of

$$E(dx) = \sum_{n=1}^{x/2-1} 2n\left(n+1\right)$$

Finally, We need to add in the Psi Replenish rule. It is optimal to replenish the first time you go down to d4. This is equivalent to having one round with d6 as the terminating die and one round with d4 as the terminating die. This results in and Expected value of d6 Psionic Talent Die with Replenish (E(d6r)) of:

$$E(d6r) = 2(E(d6)) - E(d4) =32 - 10 = 22$$

$$E(dxr) = \sum_{n=1}^{x/2-1} \left(4n-2\right) \left(n+1\right) $$

However, it's often easy enough to solve that type of problem by simulation and it's usually simpler than doing the math. So I actually prefer @Someone_Evil's answer here.

Here is the graph of the cumulative probability of the Psionic Die becoming unusable:

![![Probability of roll number by die size][1]

\begin{array}{c|l} \textbf{Dice} & \textbf{mean} & \textbf{min} & \textbf{5%} & \textbf{median}& \textbf{95%} \\ \hline d6 & 22 & 3 & 6 & 18 & 51\\ d8 & 62 & 5 & 17 & 53 & 139\\ d10 & 132 & 7 & 37 & 113 & 291\\ d12 & 240 & 13 & 69 & 206 & 526\\ \end{array}

\$\endgroup\$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.