A Sunny Place for Ideas to Grow

Farkle Odds

Farkle is an old dice game popular at parties and in bars. It’s a folk game, so the exact rules and scoring vary from place to place. I was introduced to the game on Facebook, where there is an online flash version. Basically, the game is played in rounds. During each round, you roll up to 6 dice. Certain die combinations are worth points. If you score some points during a roll, then you must take at least some scoring dice away and add those points to your point total for the round. Then you have the option of rolling again or standing pat. If at any time you roll and you don’t score, you “Farkle” and lose all of your points scored so far for the round. If you stand pat, then you can “bank” your points from the current round towards your total points for the game. In the flash version on Facebook, the following die combinations can score:

Any single 1 or 5

Three of a kind

Four of a kind

Five of a kind

Six of a kind

Three pairs

1 through 6 straight run

On every successful roll, you should be taking at least one die away. If you happen to score all of your remaining dice during a roll, you can continue the round with all 6 dice again.

So I got to wondering, what are the probabilities of rolling various die combinations in Farkle? How often do you score, and how often do you Farkle? So I made the following tables.

The most important question you should be asking yourself on every throw is, “what are the chances that I’m going to Farkle on this throw?” So we’ll start with a table that shows the odds of Farkling versus various numbers of remaining dice. For each number, a calculated probability is shown with odds. Counting die combinations can be tricky, and so I wrote a small Farkle simulation that would run through 10 million rolls of 6 dice and count the Farkles.

Number of Dice Left

Probability (Odds)

Number of Farkles
Out of 10 Million Throws

6

2.31% (1 in 43.2)

231539

5

7.72% (1 in 13.0)

770832

4

15.74% (1 in 6.4)

1573927

3

27.78% (1 in 3.6)

2779829

2

44.44% (1 in 2.3)

4445297

1

66.67% (2 in 3)

6664089

So the probability of Farkling is pretty low when you’re rolling 6 dice, and it is pretty high (2 in 3) with only one die. But of course we knew that already! More interesting to me is that it is almost 1 in 2 to Farkle on two dice, and almost 1 in 3 to Farkle on three dice!

There are also some special die combinations that you can only get with six dice: the 1 through 6 straight and the triple pairs. Probabilities, odds and simulation results for these cases appear in the next table. I’m also considering the case of double trips – while it does not lead to a special score in the Facebook variation (it is scored just like two “3 of a Kind” throws), it has special value because it clears all the dice.

Combo

Probability (Odds)

Number of Times
Out of 10 Million Throws

Triple Pairs

3.86% (1 in 25.9)

385877

Straight

1.54% (1 in 64.8)

154681

Double Trips

0.64% (1 in 155)

64182

Finally, below is a table which shows the probabilities and odds for getting “N of a Kind” for various numbers of dice being rolled.

Number of Dice

6 of a Kind

5 of a Kind

4 of a Kind

3 of a Kind

6

0.0129% (1 in 7776)

0.386% (1 in 259.2)

4.82% (1 in 20.7)

30.86% (1 in 3.24)

5

N/A

0.0772% (1 in 1296)

1.93% (1 in 51.8)

19.3% (1 in 5.2)

4

N/A

N/A

0.46% (1 in 216)

9.26% (1 in 10.8)

3

N/A

N/A

N/A

2.78% (1 in 36)

and the following table shows the simulation results corresponding to the the above table, out of 10 million throws.

Number of Dice

6 of a Kind

5 of a Kind

4 of a Kind

3 of a Kind

6

1306

38439

482740

3087911

5

N/A

7809

192986

1929004

4

N/A

N/A

46167

926552

3

N/A

N/A

N/A

278109

Calculation Details: Probability for Everyone!

In the following section, I will show how to calculate the above Farkle probabilities. But if mathematics makes you run screaming for the door, you’d best turn back now!

But seriously, this stuff isn’t too bad. Calculating probability is all about counting some things that can happen and dividing by everything that can happen. The difficulty in probability is not really in the math, it is in paying attention to how you count things (and making sure you don’t count them twice!) The following table shows the number of possibilities for rolling up to 6 dice.

Number of Dice

Number of Possibilities

1

6

2

36

3

216

4

1296

5

7776

6

46656

In the following, I’m going to use the notation (n m) to stand for “the number of combinations of n objects taken m at a time”. Usually the n appears over the m in parentheses without a division bar, and is just n! / (m! (n-m)!) where the “!” denotes the factorial. ( There is a good discussion of these factors at Not About Apples, and it even happens to be in the context of Farkle! ) The table below shows die combinations with interesting scoring patterns where each distinct die result is labeled A through F along with the number of times they show up in the list of all possible die combinations. The number of dice considered in the roll is just the length of the pattern. Sometimes a named pattern like “3 of a Kind” may have more than one letter pattern. For example, with five dice this may be “AAABB” when there is also a pair with the trips or “AAABC” when there is no other pair.

There are two factors (included in the table) which go into counting the number of ways you can get the associated pattern. The first factor is the number of ways in which you can rearrange the dice in the given pattern over the available slots. The second factor is the number of ways you can assign available numbers to the letter variables. The total number of ways you can get the pattern is the product of these two factors.

Care must be taken in evaluating the second parameter: When a particular letter in a pattern is “distinguishable” from the other letters under rearrangement, then the assignment factor just includes the number of available numbers to assign to that letter. When a group of letters in a pattern are “indistinguishable” from each other under rearrangement, then the factor will include (n m) where n is the number of available numbers to assign and m is the number of letters in the letter group. For example, in the pattern “AAABB” (trip A’s and a pair of B’s) the A and the B are distinguishable, because there is no way I can rearrange the A’s and B’s to trick me into thinking I had trip B’s and and a pair of A’s. But in the pattern “AAABC”, the A is distinguishable but the B and the C are indistinguishable, and so for the B and C you want to take the mathematical combination. Essentially, this is because rearranging them gives the same letter pattern, and we already counted all such rearrangements in the first factor!

Combo

Pattern

Rearrangements

Assignments

Total Number of Ways

6 of a Kind

AAAAAA

(6 6)

6

6

5 of a Kind

AAAAAB

(6 5)(1 1)

(6)(5)

180

5 of a Kind

AAAAA

(5 5)

6

6

4 of a Kind

AAAABB

(6 4)(2 2)

(6)(5)

450

4 of a Kind

AAAABC

(6 4)(2 1)(1 1)

(6)(5 2)

1800

4 of a Kind

AAAAB

(5 4)(1 1)

(6)(5)

150

4 of a Kind

AAAA

(4 4)

6

6

3 of a Kind

AAABBC

(6 3)(3 2)(1 1)

(6)(5)(4)

7200

3 of a Kind

AAABCD

(6 3)(3 1)(2 1)(1 1)

(6)(5 3)

7200

3 of a Kind

AAABB

(5 3)(2 2)

(6)(5)

300

3 of a Kind

AAABC

(5 3)(2 1)(1 1)

(6)(5 2)

1200

3 of a Kind

AAAB

(4 3)(1 1)

(6)(5)

120

3 of a Kind

AAA

(3 3)

6

6

Triple Pair

AABBCC

(6 2)(4 2)(2 2)

(6 3)

1800

Straight

ABCDEF

(6 1)(5 1)(4 1)(3 1)(2 1)(1 1)

(6 6)

720

Double Trips

AAABBB

(6 3)(3 3)

(6 2)

300

And following is the Farkle pattern table. Note that since “1” and “5” can never appear in a Farkle throw, even though the number of die possibilities in the denomiator is still coming from the above table for six sided dice, the number of assignments will always come out of 4 die possibilities instead of 6!

Combo

Pattern

Rearrangements

Assignments

Total Number of Ways

Farkle

AABBCD

(6 2)(4 2)(2 1)(1 1)

(4 2)(2 2)

1080

Farkle

AABBC

(5 2)(3 2)(1 1)

(4 2)(2)

360

Farkle

AABCD

(5 2)(3 1)(2 1)(1 1)

(4)(3 3)

240

Farkle

AABB

(4 2)(2 2)

(4 2)

36

Farkle

AABC

(4 2)(2 1)(1 1)

(4)(3 2)

144

Farkle

ABCD

(4 1)(3 1)(2 1)(1 1)

(4 4)

24

Farkle

AAB

(3 2)(1 1)

(4)(3)

36

Farkle

ABC

(3 1)(2 1)(1 1)

(4 3)

24

Farkle

AA

(2 2)

4

4

Farkle

AB

(2 1)(1 1)

(4 2)

12

Farkle

A

(1 1)

4

4

Most surprising to me here is that there is basically only the one die pattern to Farkle with 6 dice. Cool! So that is why a 6-die Farkle is so rare: you basically have to roll exactly two doubles every time.Conclusion

These techniques can be changed slightly to cover other dice games like Yahtzee or craps, or also card games. Writing the small Farkle simulation was beneficial because it helped me find a couple of places where I fat-fingered the calculator coming up with the actual numbers. The code used to generate the above numbers is available upon request. I hope you enjoy playing Farkle as much as I do!

So I wrote a simulator myself, that is a fully functional Farkle game (using the rules from FB), wrote in my ‘system’ about when to hold ’em and when to fold ’em. Making simply the aggressiveness variable. Meaning I won’t bother to keep any thing that is less than x points. 300 by default, up to 1500, etc. Don’t bank unless >= x and then only when you have so many dice left, blah blah.

After debugging I ran a bunch of simulations capturing min/max/avg games. Pretty interesting stuff. I still have more work to do regarding other parts of my system. Meaning right now it always rolls again if it gets three of a kind and has three left. That might be too aggressive if you’re well past the threshold, etc.

Fun stuff. I’m glad I’m not the only one who thinks of simulations for these things…

Well, I too just started playing FB Farkle and am now too driven to write a farkle strategy evaluator. Want to evaluate millions of games of farkle with different strategies. Would be interested in knowing how your strategies compare for the FB rules.

I also wrote some code recently to study Farkle odds. Funny how we all did this recently — maybe a surge in interest because of the Facebook app. My family plays the “PocketFarkel” variant in real life, so my numbers are based on that. For the chance of farkling on n dice, the numbers I got match yours very closely, which is great.

If there are only 46656 possible outcomes of rolling 6 dice, why simulate 10 million random rolls? The number of combinations is small enough to enumerate them and get exact counts. Simulating random outcomes as a way of evaluating different strategies does make sense.

Good point about writing the simulation! The answer is that having just counted the possible outcomes with pencil and paper, I wanted to validate the results with a completely different approach. I was worried about inadvertently duplicating any counting mistakes from the calculation in the program; although in hindsight, the same filters I developed to score the random throws could have been used on a straight up enumeration.

Hmm, didn’t get any notice of replies… I didn’t mean to leave you all hanging!

I should maybe find a place to post the code/app and some screen shots.

I’m a little frustrated in that my strategies aren’t converging as well as I’d expect. Even with simulation 10,000 games, I get more variation in results than I’d expect on repeated runs.

For me, the real interest isn’t about average game score or single max game ever, I think it’s really about % of games over xx. Now is it 9k or 10k? Or higher? Based on my own reactions and to the leaderboard of my friends, 10k is good. Makes me feel good, is reasonably attainable and I can push that last round for something bigger, or buy a round on FB.

So before revealing my strategies, what % of games do you think are over 10k??? :-)

10,000 is not nearly enough to accurately simulate the average. Some of the events have very low probability of happening, and you are stringing them along in series, so you are likely missing many combinations (or hitting too many).
Also, when simulating so many random events, you’ll need to do a serious check of your pseudo random number generator (esp. rand()).
Lastly, has the Facebook app reset a couple times this month for y’all, too? My personal best has remained, but the best among friends has reset twice (not just the weekly and monthly). I wonder if they are tweaking the app and some settings do not convert to the new version… And if they are tweaking it, has the scoring changed? I’ve noticed that you cannot take 3-pair if you have 4-of-a-kind and a pair (the 3 pairs are not all unique), even though sometimes it would be a higher score. But I don’t know if you ever could….

Technically it’s unlimited: you could specify any large number, and I could (for example) keep rolling 6 “1’s” over and over again until I exceed it, although it would be more unlikely the higher the number you choose.

Actually, the result is correct. It is statistically valid because I counted all of the ways you can throw a Farkle with six die (above). And, as someone else already pointed out above, simulating with 10 million throws is already overkill because there are only 46656 6-die combinations and I counted them already. (Although I still contend the simulation was useful from the point of view of attacking the problem cleanly using an alternate method.)

Are we talking about the same figures? I am calculating the odds of Farkling with 6-die on ONE throw (ie- the first throw). Perhaps you are considering the case of rolling up several throws together and failing to reach the 300 point minimum score before Farkling, as in the Facebook variation? I’d agree offhand that seems more like 10%, but that’s not what I calculated.

I have been trying to figure out the odds on Farkling at the end of a frame when you have a one or five with two dice left.

Obviously, you will Farkle 2 out of 3 times throwing one die. Your chart shows you will Farkle 1 out of 2.3 times with two dice.

My question is which would be better in the following scenario. You roll three dice and it comes up 5,5,4. Should you take one 5 or two 5’s? One way you have to roll either a 1 or 5 with one dice, the other way you have to roll either a 1 or 5 twice or either double 1 or 5.

I think it is better statistically to take one 5 at the time but I don’t know enough about the math to prove it.

I have always had that same question. So I decided to try and tackle this.

Things to Clear Board:
1. Keep two dice and throw one die. Chance of 1/3 of getting a 1 or 5
2. Keep one die and throw two dice. (Things that must happen)
A. Both dice are 1 or 5 and clears board. Chance 4/36
B. 1st die scores and second does not. Chance 16/32
b. Throw second dice and it scores. Chance 1/3

So we need:
A or (B and b) to clear board
A = 4/36
C = (B and b) = 16/32 * 1/3 = 16/96

hmm… (A and C) is an impossibility, so the way I like to brake it down is that we need:
A or (notA and C)
(which the following shows is logically equivalent anyways :) .
P(A or ((not A) and C)))
= P(A) + P(-A and C) – P(A and (-A and C))
= P(A) + P(-A)P(C) – 0(!)
= P(A) + (1-P(A))P(C)
= 4/36 + 32/36*16/96 = 384/3456 + 512/3456 = 896/3456
This gives the same result, and is good verification.
I have an undergrad math degree, but am pretty rusty:)

Based on your odds, I believe the Facebook Farkle is programmed to Farkle at a rate much higher than your information indicates. I will commonly Farkle on 6 dice at least once a game and often time twice.

I’ve been absent, sorry. I’ve run a million+ simulations recently and modified my strategy some based on it. I still don’t have a good place to post the project, or even some pics of the results. I’d be happy to share. .Net/c#. I haven’t been looking at it lately, what with parenting, work, travel, xmas :-).

I believe FB farkle is based on different statistics because I have hit farkle on 6 dice at least once a game too. I just played someone that never hit a farkle although they rolled 2 and 3 die many times. It took 14 turns to win and they never farkled when I farkled 5 times and I never rolled less than 3 die unless I don’t have 300. It seems when you are hot you can roll anything and other times no matter how conservative your play, farkle, farkle, farkle.

so odds of farkling with 2 dice and, if necessary, continuing with 1 die:

4/9 + 4/9 * 2/3 = 20/27 = .7407407

So, if you are terribly far behind your opponent (say less than 5-6000 versus 8500+), and you figure you must get as much as possible as soon as possible (read “are desperate”), taking both dice and going straight for the roll of one die for a 2/3 chance of farkling is better than taking just one die and rolling two.

Personally, with 200 or 250 points at risk, I’ll often throw back the second 5 and roll two dice, hoping for at least changing it to a 1 if not getting a clear. Or if I am a more than a little behind (read “a little desperate”), I’ll do this with 300-350 points. But I haven’t fully calculated this strategy for a brain quite yet. It involves estimates like your average score with a 6-dice throw, how many times you have already farkled and your average farkle rate (to determine true cost of farkling), and your current atRiskTotal points.
If I recall correctly, my current best computer brain calculates the value of roll two dice at around 20 points in this range (200-350 at risk), so it never will roll if it can take the 5 and bank.

How much does everyone’s best farkle brain’s get per round on average? My current one gets about 545 per round. (5450 per 10-round FarkleSimple game)
How much does yours farkle? Mine is about 19.4% of the time.

I (also) have been intrigued by the numbers behind farkle. I started off from a pure math approach, but since my combinatorics skills are a bit rusty, I resorted to cheating by using Excel.

I enumerated every single roll combination and wrote a function to calculate the scores. It got a little tricky when it came to scoring three pairs, but I managed to do this as well.

I’m not guaranteeing that I haven’t made a mistake along the way, I’m almost sure that I’ve missed something. However, I do feel very confident that my results are at the very least close.

I sought to find the expected value of any given roll, compare this to the risk associated with any given roll to come up with a risk:reward ratio.

After finding the raw expected value of a given roll, I also factored in the chance that it may clear the board and give the player another roll of 6 dice. In my calculations I assumed that the player would (or perhaps is forced to) always re-roll 6 dice. Thus, I added the Expected value of a 6 die roll dependent upon the condition that the player gets one.

As for the above assumption, it is completely possible (not likely) to continue re-rolling forever. I stopped after the third iteration of a re-roll because this they begin to become insignificant near this point.

Also, I included scoring values identical to that of the Farkle game included on Facebook.

Before the results, I will present my hypothesis. I believe that it is more risk averse to roll with 2 dice remaining than it is with 1 die. I have a friend who believes otherwise. I believe it is better to roll 1 die because of the reward of the expected value of re-rolling 6 dice.

Alright, anybody who has read this far deserves some results. Here they are.

Let R(x) be the raw expected value of rolling ‘x’ dice.
Let C(x) be the probability of clearing the board in one roll using ‘x’ dice
Let E(x) be the adjusted expected value considering a forced re-roll of 6 dice.
Let F(x) be the probability of a Farkle rolling x dice
And finally, let RR(x) = E(x)/(100*F(x)) or the Reward/Risk ratio (thus a higher number is better for the player).

I’ll pause a moment here to comment on results compared to my hypothesis. The expected value of rolling 1 die is higher than both re-rollling 2 and 3 dice! But this only considers the reward, not the risk. So let’s keep going.

These are well known and easy to find on the web (as long as you find somebody who states it correctly!) but I’ll publish again.
F(6) = 0.023
F(5) = 0.077
F(4) = 0.157
F(3) = 0.278
F(2) = 0.444
F(1) = 0.667

Ouch…. well, I said there might have been mistakes and I found some already. I forgot to count some of the outs that clear the board for C(3) and C(4) forgetting that 1,1,5; 1,5,5 work for C(3) and 1,1,5,5 works for C(4).

The numbers *have* changed, but my hypothesis is still true.

Mods, if you want you to avoid my double-post feel free to replace the numbers.

Raistlan,
I come up with a different number for C(6), the number of clearing combinations with 6 dice: 3636/46656 = .077932 or 7.793%. Not having seen anything published, I don’t know if you or I (or both of us) are in error. All the other R’s, C’s, and F’s come out the same for me.
As for the RR, Reward-to-Risk ratio, I think it needs work. The Reward is the expected score if you don’t farkle (so far so good), but your Risk is 100*probability of farkling. I use something like this in my brains, but the Risk component is Cost of Farkling (Number of Points At Risk) * probability of farkling. Your RR looks to me like you have just 100 points at risk (but it’s probably from making a percent, I see). Wouldn’t you make a different determination of the Reward to Risk depending on how many points you have at risk? With your ratio, you could have 350 or 2500 points this round and still make the same determination about whether to roll in this situation, wouldn’t you?
Also, instead of making a ratio, I just subtract. But that’s really the same thing; with a ratio you would look for above 1.0, with a difference you’d look for above zero.
I like your E(x) idea. I have something like it in my code, but not neatly summarized. (But before we can talk numbers, we need to resolve C(6).)

I definitely have missed some combinations of clearing 6… thank you for calling this to my attention. I left out all of the 5 of a kind with a 1 or a 5, 4 of a kind with two 1’s or 5’s, etc.

After doing some calculations, I agree with your number of 3636.

I’ve also noticed a few other problems with my assumptions. Namely that the risk of farkle-ing that I’ve published does not take into account that I’ve assumed that a user will always re-roll 6 dice. Each time you re-roll 6 dice, you risk farkle-ing.

Yes, I multiplied the RR by 100 just to convert to % because for whatever reason some humans find it easier to understand this than the counterpart decimal.

I definitely agree with your comment that we need to consider how many points are at risk into the RR. This way it will yield substantive values to compare to the current game situation.

I suggest this:

RR(x) = E(x) – F(x)*current score

I think this makes a little more sense. It compares what we stand to gain to what we stand to lose. Thus, if the value is negative we stand to lose more points than we expect to gain.

The break even points I calculate for RR(x) are as follows:
RR(6) stop at 17,750 games points
RR(5) stop at 3,100
RR(4) stop at 1,050
RR(3) stop at 400
RR(2) stop at 250
RR(1) stop at 300

RR(2) doesn’t make sense because it violates the rules of the game.

We could also build a risk tolerance constant into the equation. For instance, I am willing to risk an RR(x) as low as -100 instead of only down to 0.

I wish I had a simulator to run this on. What is the perfect amount of risk?

Raistlan, I’ve done some simulations on board games before using C++ because this sort of risk / rewards analysis interests me. If you’re willing to give me your time in explaining how to put your strategy into a form a program I made could use the amount of risk could be (theoretically) determined from the results.
I.e., never take 5’s, only take three 2’s if you have no other choice, etc. And the statistics of many simulations would hopefully reflect the theory.

(As a side note, I was brought here from an Excel site where you had posted similarly.)

You math geeks help the rest of us a lot..BUT Farkle is not left to chance. Why it is rigged I can’t say, but it is rigged.
Compare actual results of Farkle to Farkle 2 and Super Farkle (all on Facebook) and you’ll quickly realize that they do not compare at all. Your efforts ar probably extremelt accurate with bar/cup tossing Farkle but certainly not with these computer rigged games. The rate of Farkling on Farkle is very high. On Farkle 2 and Super Farkle it is very low. Now try to calculate the reasons for setting them up that way. If it ever becomes clear, let us know please.

H.H.,
You are very likely right in regards to Farkle Simple (you alone versus the dice for 10 rounds). It seems to cheat in your favor on Monday mornings, after you’ve farkled (or at least after several farkles), and after you’ve spent chips on extra rounds.

This I find reasonable. Also, as you say, farkling seems to happen a bit more often than it is supposed to. Or maybe the other games you mention (which I have not tried) cheat in your favor in regards to farkling rate.

But Farkle Pro, playing against another player (first to 10,000 wins) seems much less prone to oddness. The only thing I’ve noticed there is that sometimes waiting to roll the dice at least 10 seconds seems to give a higher probability of good dice. And others have noticed it too, I think, as many people, especially if they are behind, will tend to wait a bit long before rolling. It may have to do with re-seeding the random number generator with more entropy periodically, which would happen more likely if you wait, or they may wish to encourage chatting and so if you’ve chatted you’ve used up time so they reward that with better dice. Just a suspicion, no proof.

In my farkle simulator, I have a couple different random number generators to choose from. I don’t know what Facebook uses, so I make sure that my strategy does well on more than just one RNG.

By writing I admit I’m no mathematical genius so I hope someone can help me.

Our local tavern has a roll of the day game that I believe the odds of winning anything let alone the pot are astronomical.

Here is the game…

You get 10 die and 2 rolls for $1.00. When you roll the first time you pull out whatever die you have the most of, say 4 two’s. You have 6 remaining for your 2nd roll. Let’s say you get 3 more two’s. Now for an extra $1.00 you can buy a third roll.

I see in one of the charts above that using 6 die that the odds of getting 6 of a kind are 1 in 7776, 5 of a kind are 1 in 259.2 etc.

My question is: Using ten (10) die, in the two initial rolls’ what are the odds of getting 1 of a kind, 2 of a kind etc. up to 10 of a kind?

I have been playing the new Farkle 2 game on facebook, and started keeping track of something to confirm my suspicions. The odds of getting either a 1 or a 5 on any roll of the dice is much higher than the 33+% one would expect statistically. I am averaging over 40 %. What gives?