Talk:Pig the dice game/Player: Difference between revisions

→‎Strategy: tournament result
(→‎Strategy: tournament result)
Line 88:
 
I should at least include a strategy of random play in my solution so that I can gauge any other strategy against it.--[[User:Paddy3118|Paddy3118]] 11:28, 15 September 2012 (UTC)
 
===Tournament of Pigs===
I decided to have various strategies fight it out and see who has the highest winning chance. Contestants:
 
A: always roll
 
R: randomly roll. Roll if holding score is 0, otherwise has 1/3 of chance to hold.
 
H: hold at 20. Roll if opponent >= 80; roll if self score >= 78; roll if holding score <= 20; hold otherwise.
 
O: the optimal holding pattern discussed above.
 
Each strat also has an "anti": AntiX is the holding pattern that maximizes winning when playing agains X. Note that AntiO ''is'' O. The following table is the resulting winning chances when one plays agains another in row major, that is, the top right corner means "when playing agains O, strat A has 0.121 chance of winning if move first, 0.112 if move second". The third number is just the sum of those two numbers; if it's gerater than 1, the strat has better overall odds when playing that opponent.
<pre>
A AntiA R AntiR H AntiH O
A 0.503/0.497 1.000 0.122/0.113 0.235 0.168/0.160 0.329 0.139/0.130 0.268 0.124/0.115 0.238 0.121/0.112 0.234 0.121/0.112 0.233
AntiA 0.887/0.878 1.765 0.529/0.471 1.000 0.806/0.768 1.575 0.577/0.520 1.097 0.570/0.510 1.081 0.530/0.471 1.001 0.524/0.464 0.988
R 0.840/0.832 1.671 0.232/0.194 0.425 0.528/0.472 1.000 0.191/0.153 0.343 0.206/0.168 0.374 0.215/0.175 0.390 0.221/0.181 0.402
AntiR 0.870/0.861 1.732 0.480/0.423 0.903 0.847/0.809 1.657 0.527/0.473 1.000 0.509/0.452 0.962 0.473/0.415 0.889 0.475/0.416 0.891
H 0.885/0.876 1.761 0.490/0.430 0.919 0.832/0.794 1.626 0.548/0.491 1.038 0.529/0.471 1.000 0.483/0.421 0.904 0.489/0.428 0.917
AntiH 0.888/0.879 1.766 0.529/0.469 0.999 0.825/0.785 1.610 0.585/0.526 1.111 0.579/0.517 1.096 0.530/0.470 1.000 0.527/0.466 0.993
O 0.888/0.879 1.767 0.536/0.476 1.012 0.819/0.779 1.598 0.584/0.525 1.109 0.572/0.511 1.083 0.534/0.473 1.007 0.530/0.470 1.000
</pre>
One funny thing is, AntiA is not the best at beating A; I blame loss of floating point precision for this, though I'm not completely sure.
 
===Someone else's strategy===
Anonymous user