Saturday, September 21, 2013

Optimal Strategy for Farkle Dice!

In this post, I will discuss my findings in terms of an optimal strategy for the game of Farkle.  All of my findings are based on sound mathematical methods and a computer program was used to determine the optimal strategy.  Before I begin, let me first state the Rules of the game that I was using while developing the strategy
Each 1: 100 points
Each 5: 50 points
3 1's: 1000 points
3 2's: 200 points
...
3 6's: 600 points
4 1's: 2000 points
...
4 6's 1200 points
5 1's 3000 points
...
5 6's 1800 points
Straight 1-6 1500 points
3 Pairs (E.G. 22 33 44): 750 points
Everything else is considered to be a Farkle (0 points).

I calculated these figures under the assumption that we are trying to maximize expected value, however that is not necessarily the case.  To employ a true optimal strategy, we want to maximize the probability of winning which depends on both your current score and your opponents score.  However, to make the calculations easier, I ignored those two variables altogether and simply found how to maximize the expected value for any single turn.

Here is a small table that shows my findings.
Each entry in the table shows the expected value in the given situation if you were to employ this optimal strategy.
For example, lets say I have 250 points and I am rolling 3 dice, it can be seen that the best option for me is to roll again (yielding an expected value of 293.4 which is better than 250).  However, if I had 500 points rolling 3, banking the 500 points is the best play because the risk of Farkling is too high to wager the 500 points.
Note that not all entries are filled in in the table.  This is because they are impossible states.  (I.E. you can't have 50 points rolling 3).
Now let's consider a more complex situation.  Let's say I just rolled the following 6 dice:
1 2 2 2 5 4
Clearly I have a lot of options, but which one is best?  Let's use the table!
50 rolling 5 (5) - EV = 363.834
100 rolling 5 (1) - EV = 399.911
150 rolling 4 (1 5) - EV = 307.673
200 rolling 3 (2 2 2) - EV = 257.584
250 rolling 2 (2 2 2 5) - EV = 250
300 rolling 2 (2 2 2 1) - EV = 300
350 rolling 1 (2 2 2 1 5) - EV = 350

So the best option is to bank the 1 and roll the other 5 dice, resulting in an average of about 400 points. Using this same methodology, you can take any situation and determine the best possible play.

  Number of Dice
Points 1 2 3 4 5 6
0           548.858
50         363.834  
100       274.776 399.911  
150     227.968 307.673    
200   221.706 257.584 343.8    
250 274.669 250 293.4      
300 300 300 329.228     802
350 350 350     596.22 846.014
400 400 400 400.947 498.2 638.291 890.036
450 450 450 450 540.176 680.368 934.065
500 500 500 500 582.157 722.453 978.099
550 550 550 550 624.144 764.545 1022.666
600 600 600 600 666.139 806.642 1067.891
650 650 650 650 708.139 849.953 1113.281
700 700 700 700 750.142 893.894 1158.674
750 750 750 750 792.147 937.847 1204.068
800 800 800 800 834.154 981.801 1249.464
850 850 850 850 876.162 1025.756 1295.174
900 900 900 900 918.17 1069.711 1341.411
950 950 950 950 960.178 1114.429 1387.917
1000 1000 1000 1000 1002.188 1160.198 1434.468
1050 1050 1050 1050 1050 1206.254 1481.147

If you're interested in seeing the extended table (up to 10000 points), or would like to understand the methods that I used to come up with this strategy, feel free to send me an email at RMcKenna21@gmail.com.