Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
First, a brute force R simulation shows that the optimal ordering is to play the three adversaries first weakest, third strongest and middle fair:
ord=function(p){ z=2*(runif(1)<p[1])-1 while(abs(z)<15)z=z+2*(runif(1)<p[1])-1 y=2*(runif(1)<p[2])-1 while(abs(z+y)<30)y=y+2*(runif(1)<p[2])-1 x=2*(runif(1)<p[3])-1 while(abs(z+y+x)<45)x=x+2*(runif(1)<p[3])-1 return(x+y+z>0)} mcord=function(p,T=1e2){ for(t in 1:T)F=F+ord(p) return(F/T)} comp=function(T=1e2){ return(c(mcord(c(.5,.55,.45),t), #mcord(c(.5,.45,.55),t),#1-above mcord(c(.55,.5,.45),t), #mcord(c(.45,.5,.55),t),#1-above mcord(c(.55,.45,.5),t) #mcord(c(.45,.55,.5),t)))#1-above ))}
where I used probabilities closer to ½ to avoid estimated probabilities equal to one.
> comp(1e3) [1] 0.051 0.038 0.183
(and I eliminated the three other probabilities by sheer symmetry). Second, checking in Feller’s bible (Vol. 1, XIV.3) for the gambler’s ruin probability, a simple comparison of the six orderings confirms this simulation.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.