The greedy strategy means locking the trait as soon as it has a color that is needed. opt strategy may reroll purple SS atk if encountered early on.
Let c denote the remaining currency, o and p denote the number of remaining orange and purple traits to get, r the remaining traits rolled but not checked, and Pgreedy(c,o,p,r) and Popt(c,o,p,r) denote the chance of obtaining o orange and p purple traits with c currency using the greedy and opt strategies, respectively.
mop is the price of a roll, defined by the game as:
mop=5×(6−o−p)
α and β are the probability of SS Atk and specific color. They are defined by the game as:
α=0.0756%×91β=51=0.000084=0.2
Pgreedy(c,o,p,r) can be calculated recursively as: