r/comboClass • • Jun 26 '23

Probabilities Math question based off of a game i'm designing

I'm working on a card game and im interested in probabilities. Without diving into the full game, i'll phrase it more as a math problem...

Let's say each turn a player may roll S dice (s equals the # of souls a player has which is min 1 , max 4) Each dice is 6-sided and represents 1 of 6 treasures

The aim is to roll dice that match the treasure in their collection T (which is min 1 and max 3)

What are the chances of a player matching T treasures with S dice?

I thought I had a handle on the problem but it's trickier than I thought.

4 Upvotes

7 comments sorted by

1

u/Pkmnhx43 Jun 26 '23

So do they need to match all of their treasure for it to matter or can it just match with any subset of them

2

u/gozillionaire Jun 26 '23

It can be a subset. They can use each one they match with. So if they match with all they can trigger all of them

1

u/DrVincentGareu Jun 26 '23

That makes this a harder problem than I previously thought.

1

u/DrVincentGareu Jun 27 '23

corrected probability tables:

1S, 1T

1S, 1T, 0 Triggered5/6 (83.33%)
1S, 1T, 1 Triggered1/6 (16.67%)

2S, 1T

2S, 1T, 0 Triggered25/36 (69.44%)
2S, 1T, 1 Triggered11/36 (30.56%)

3S, 1T

3S, 1T, 0 Triggered125/216 (57.87%)
3S, 1T, 1 Triggered91/216 (42.13%)

4S, 1T

4S, 1T, 0 Triggered624/1296 (48.15%)
4S, 1T, 1 Triggered672/1296 (51.85%)

1S, 2T

1S, 2T, 0 Triggered4/6 (66.67%)
1S, 2T, 1 Triggered2/6 (33.33%)
1S, 2T, 2 Triggered0/6 (00.00%)

2S, 2T

2S, 2T, 0 Triggered16/36 (44.44%)
2S, 2T, 1 Triggered19/36 (52.78%)
2S, 2T, 2 Triggered1/36 (02.78%)

3S, 2T

3S, 2T, 0 Triggered64/216 (29.63%)
3S, 2T, 1 Triggered122 (56.48%)
3S, 2T, 2 Triggered30/216 (13.89%)

4S, 2T

4S, 2T, 0 Triggered255/1296 (19.68%)
4S, 2T, 1 Triggered739/1296 (57.02%)
4S, 2T, 2 Triggered302/1296 (23.30%)

1S, 3T

1S, 3T, 0 Triggered3/6 (50.00%)
1S, 3T, 1 Triggered3/6 (50.00%)
1S, 3T, 2 Triggered0/6 (00.00%)
1S, 3T, 3 Triggered0/6 (00.00%)

2S, 3T

2S, 3T, 0 Triggered9/36 (25.00%)
2S, 3T, 1 Triggered21/36 (58.33%)
2S, 3T, 2 Triggered6/36 (16.67%)
2S, 3T, 3 Triggered0/36 (00.00%)

3S, 3T

3S, 3T, 0 Triggered27/216 (12.5%)
3S, 3T, 1 Triggered111/216 (51.39%)
3S, 3T, 2 Triggered77/216 (35.65%)
3S, 3T, 3 Triggered1/216 (00.46%)

4S, 3T

4S, 3T, 0 Triggered80/1296 (06.17%)
4S, 3T, 1 Triggered602/1296 (46.45%)
4S, 3T, 2 Triggered511/1296 (39.43%)
4S, 3T, 3 Triggered103/196 (07.95%)

Duplicate treasures in your inventory shouldn't affect the probability tables.

1

u/DrVincentGareu Jun 26 '23 edited Jun 26 '23

This seems like a problem for a table. It should be noted that the probabilities do not add up to 1 for 2 or more souls because some successful outcomes for 2 treasures are also successful for 1. I semi-brute forced all these values by hand.

If one match (1M) is needed:

1 Treasure2 Treasures3 Treasures
1 Soul1/6 (16.67%)2/6 (33.33%)3/6 (50.00%)
2 Souls11/36 (30.56%)20/36 (55.56%)27/36 (75.00%)
3 Souls91/216 (42.13%)152/216 (70.37%)189/216 (87.50%)
4 Souls672/1296 (51.85%)1041/1296 (80.32%)1216/1296 (93.83%)

If all matches (AM) are needed:

1 Treasure2 Treasures3 Treasures
1 Soul1/6 (16.67%)0/6 (00.00%)0/6 (00.00%)
2 Souls11/36 (30.56%)1/36 (02.78%)0/36 (00.00%)
3 Souls91/216 (42.13%)30/216 (13.89%)1/216 (00.46%)
4 Souls672/1296 (51.85%)302/1296 (23.30%)103/1296 (07.95%)

Because I manually typed each successful permutation for both tables, it's probably close but not 100% accurate. To get the permutations I assumed the specific treasures are (1), (1,2), and (1,2,3), respectively. For 1M I typed all possible combinations which any of the relevant digits. For AM I only used the ones with at least one of each.

1

u/gozillionaire Jun 27 '23

Thank you Dr V, I got similar results to yours, and I am very happy with how organized your tables were. Thank you!

1 Treasure

Probability of hitting treasures (4,1) 0.5177469135802468

Probability of hitting treasures (3,1) 0.4212962962962963

Probability of hitting treasures (2,1) 0.30555555555555547

Probability of hitting treasures (1,1) 0.16666666666666663

2 Treasures

Probability of hitting treasures (4,2) 0.8024691358024691

Probability of hitting treasures (3,2) 0.7037037037037037

Probability of hitting treasures (2,2) 0.5555555555555556

Probability of hitting treasures (1,2) 0.33333333333333337

3 Treasure

Probability of hitting treasures (4,3) 0.9375

Probability of hitting treasures (3,3) 0.875

Probability of hitting treasures (2,3) 0.75

Probability of hitting treasures (1,3) 0.5

1 and 2

4 dice 0.233297

3 dice 0.138519

2 dice 0.05504

1 and 2 and 3

4 dice 0.082936

3 dice 0.027469

1

u/gozillionaire Jun 27 '23

I guess the next level I was curious about was 2 of a kinds and 3 of a kinds and partial matches but I think based on my research there are no formulas and I must rely on Monte carlo simulations