|
||||||
Title: It's a Truel World Post by ThudanBlunder on Dec 19th, 2008, 10:38am I have just noticed that there are now lots of new interactive demos (http://demonstrations.wolfram.com/) at the Mathematica site. I've been playing around with the Truel (http://demonstrations.wolfram.com/TruelWorld/) demo. In a simplified truel one player is assumed to be a sure shot, in which case the worst player (who shoots first) should deliberately miss until one of the others (who shoot at each other, the sure shot firing last) is killed. But when we merely assume 1 > a > b > c > 0, I don't think this is necessarily true. Interestingly, in the demo mentioned above it is possible to choose numbers so that each player has an equal chance (1/3) of surviving. So for what probabilities a,b,c can this happen? Let R(X : Y) = Ratio of X winning : Y winning a duel, with X shooting first and let X hit the target with probability x and let Y hit the target with probability y Then R(X : Y) = x/(1 - x)y Now assume 3 duellists A,B,C have respective probabilities a,b,c where 1 http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/geqslant.gif a http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/gt.gif b http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/gt.gif c http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/gt.gif 0 and let F = R(C : B) let G = R(C : A) let H = R(B : A) Then we get a = (FH - G)/GH b = (FH - G)/FH c = (FH - G)/(FH - G + H) Let A(s) = probability of A surviving the truel Let B(s) = probability of B surviving the truel Let C(s) = probability of C surviving the truel Assuming C shoots first and adopts the strategy of deliberately missing, we get A(s) = 1/[(G + 1)(H + 1)] B(s) = H/[(F + 1)(H + 1)] C(s) = 1 - A(s) - B(s) and when A(s) = B(s) = C(s) = 1/3 we get (G + 1)(H + 1) = 3 (F + 1)(H + 1) = 3H From this we get F = 1 - G H = (2 - G)/(1 + G) and finally a = 2(1 - 2G)/[G(2 - G)] b = 2(1 - 2G)/[(1 - G)(2 - G)] c = 2(1 - 2G)/(4 - 5G) provided 3 - http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif7 http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/leqslant.gif G http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/lt.gif 1/2 (because 1 http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/geqslant.gif a http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/gt.gif 0) For example, choosing G = 2/5 we get A(s) = B(s) = C(s) = 1/3 when a = 5/8 b = 5/12 c = 1/5 F = 3/5 H = 8/7 On the demo this corresponds (with a die size of 120) to (A,B,C) = (24,50,75) Note that the demo has a < b < c, not a > b > c Considering a simplified truel with a = 1, b = 1/2, c = 1/3 F = (1/3)/[(2/3)(1/2)] = 1 G = (1/3)/[(2/3)(1)] = 1/2 H = (1/2)/[(1/2)(1)] = 1 Therefore A(s) = 1/[(3/2)(2)] = 1/3 B(s) = 1/[(2)(2)] = 1/4 C(s) = 1 - 1/3 - 1/4 = 5/12 This is confirmed by the demo using 12 die size and (A,B,C) = (4,6,12). Unfortunately, I have just realized that to run interactively the Truel demo requires Mathematica7, no less. :-( So I guess you'll just to have to take my word for it. :P |
||||||
Title: Re: It's a Truel World Post by ThudanBlunder on Jan 12th, 2009, 10:31pm By popular demand ::), here is some more analysis and results: Let A(s), B(s), C(s) be the respective probabilities of A, B, C surviving the truel when C, the worst shot, chooses to delibarately miss. Let A(s)*, B(s)*, C(s)* be the respective probabilities of A, B, C surviving the truel when C chooses to shoot at A, the best shot. Then we get
C should deliberately miss when C(s) > C(s)* and shoot at A when C(s) < C(s)* That is, as A(s)* + B(s)* <> A(s) + B(s) After some tedious algebra this simplifies to a[a(1 - b)2 - b] In particular, it is evident from this inequality that C should always choose to miss whenever a < b/(1 - b)2 In other words, always choose to miss when H > 1 - b (where H = the ratio of probability of B killing A to A killing B.) For the simplified truel that has a = 1, this means whenever b > (3 - http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif5)/2 = 1 - phi = 0.382... And when a = 1, equation (1) becomes Miss if c > 1 - b/(1 - b)2 eg. letting b = 1/3, we choose to miss if c > 1/4 [When c = 1/4, C(s) = C(s)* = 1/3] So assume b = 1/3, c = 1/5 < 1/4 Then A(s) = 100/525 B(s) = 280/525 C(s) = 145/525 and A(s)* = 224/525 B(s)* = 155/525 C(s)* = 146/525 And C(s)* > C(s), as expected. (However, Wolfram's aforementioned truel demo baldly claims that missing is the optimum strategy.) |
||||||
Title: Re: It's a Truel World Post by ThudanBlunder on Jan 30th, 2009, 2:12pm I wrote to the author of the Truel Demo informing him of the above analysis and giving a link. He replied, "I'm not sure I understand your analysis. It is always advantageous for the weakest player to wait until they have the first shot on one opponent." I think this can be read as, " I do not understand your analysis. This is because I have not studied it, as I believe a priori that your conclusion is wrong." This in turn may be interpreted as, "Every example of a specific truel I have seen involved a sure shot (a = 1), a good shot (9/10 http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/leqslant.gif b http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/leqslant.gif 1/2), and a poor shot (c http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/leqslant.gif 1/2). In each case the poor shot does best by shooting into the air until the other two have sorted out their differences. Therefore your conclusion is wrong and I do not understand your analysis." However, when a sure shot and two very poor shots are involved it is not wrong. I recalculated, assuming a = 1 from the outset. Then we get: A(s) = (1 - b)(1 - c) B(s) = (1 - c)b2/(b + c - bc) A(s)* = (1 - b)(1 - c)2 B(s)* = b[c + b(1 - c)2]/(b + c - bc) Calculation of C(s) - C(s)* still looks quite messy but fortunately many terms cancel and we are left with C(s) - C(s)* = c2[c(1 - b)2 - (1 - b)2 - b]/(b + c - bc) C should shoot into the air when C(s) - C(s)* > 0 and C(s) - C(s)* > 0 when c(1 - b)2 - (1 - b)2 - b > 0 That is, when c > (b2 - 3b + 1)/(b2 - 2b + 1) And b2 - 3b + 1 < 0 when 1 > b > (3 - http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif5)/2 = 1 - phi = 0.382..., as before. CONCLUSION: C should shoot into the air when c > 1 - b/(1 - b)2 In particular, C should always shoot into the air when b > 1 - phi = 0.382... Otherwise C should shoot at A, the sure shot. MORAL: Even truellists need to keep one eye on the Golden Ratio, as there is a phine line between life and death. LOL |
||||||
Title: Re: It's a Truel World Post by towr on Jan 30th, 2009, 2:33pm Even if he didn't believe/understand your analysis; at the very least he could have done a quick simulation to find out that it is indeed not always advantageous for the weakest player to wait. One counter-example is enough to disprove a proposition. |
||||||
Title: Re: It's a Truel World Post by Eigenray on Jan 30th, 2009, 6:31pm I'm not sure I understand your analysis either, so here's mine. The truelists shoot in the order A,B,C,A,..., with probabilities a<b<c. Let [p,q] = p/(p+q-pq) denote the probability that P wins starting a duel against Q. Let p' denote 1-p. Let's assume for now that c=1, that B aims at C, and C aims at B. If A deliberately misses, then the probability of A winning is simply Pm(A) = b [a,b] + b' [a,1]. If A shoots at C, the probability is Ps(A) = a [b,a]' + a' Pm(A) = a [b,a]' + a' b [a,b] + a' b' [a,1]. Now Pm(A) - Ps(A) = [ a(1-b)2 - b2 + 3b - 1 ] a2/(a+b-ab), which is positive exactly when a > ( b2 - 3b + 1) / (1-b)2. If b > (3-http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif5)/2 ~ .382, then A should always miss. In the other direction, under the assumption a < b, if b < http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/beta.gif, then A should shoot at C, where http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/beta.gif ~ .318 satisfies http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/beta.gif= (http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/beta.gif2-3http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/beta.gif+1)/(1-http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/beta.gif)2. |
||||||
Title: Re: It's a Truel World Post by ThudanBlunder on Jan 31st, 2009, 4:59am on 01/30/09 at 18:31:21, Eigenray wrote:
Oops, I forgot to determine that point. Yep, in these here parts there's many a slip 'twixt holster and hand. on 01/30/09 at 18:31:21, Eigenray wrote:
But what is there not to understand? High-school maths, clearly explained at every step? Anyway, because when all is said and done at the end of the day it goes without saying that in a very real sense a picture is worth a thousand words, below is a diagram which achieves the best of both worlds by taking into account all sides of the argument. LOL The shaded area represents when A should shoot at C. My answer agrees with yours, except I did not include the point of intersection of the two functions. |
||||||
Title: Re: It's a Truel World Post by ThudanBlunder on Feb 3rd, 2009, 11:18am Obviously no longer suspected of being congenetically related to the Usenet crank James Harris, I received a friendly reply from the author of the Truel Demo (Ed Pegg, Jr., a noted metagrobologist), agreeing with the above analysis. (Or perhaps it was Eigenray's imprimatur that did it. ;)) He says he will change the demo, but when shooting in the air is not the best option for the poorest shot I can't find any rational solutions to the equal-opportunity-of-survival scenario that is mentioned (and partly analysed in my first post). |
||||||
Title: Re: It's a Truel World Post by Eigenray on Feb 3rd, 2009, 1:28pm on 01/31/09 at 04:59:52, ThudanBlunder wrote:
Well I didn't really try too hard to understand it; I just found it easier to do my own analysis. For example, you take a > b > c instead of a < b < c. What order do they shoot in, and who targets whom? Then there are all these unexplained "we get"s. But I agree with your results. Suppose that A misses and B and C target each other, and that a < b < c are rational. Solving B(s) = C(s) gives a as a rational expression of b,c. Now solving A(s) = B(s) for c shows that b2 - 16b + 16 is a square, so we can set b = 8 + t + 12/t for some rational t. Solving now for a and c, and requiring 0 < a < b < c < 1, this gives the parameterization a = (t+2)/(t+1) b = (t+2)(t+6)/t c = -(t+2)(t+6)/(2t+6) http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif7 - 5 < t < -2 Now, with these probabilities, the condition for A to miss is A(s) - A*(s) = t/3 (10 + 7t + t2) / (t2+10t+36) > 0 which is true for all t in (-5+http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif7, -2). Of course by allowing t to be real we get a parametrization of all real solutions as well, so we can conclude that under the given assumptions, if A(s) = B(s) = C(s) = 1/3, then it is preferable for A to miss. For an integer parametrization we can take a = m/(m+n) b = m(4n-m)/[n(2n+m)] c = m(4n-m)/[2n(n-m)] where 0 < m/n < 3-http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif7. Assuming gcd(m,n)=1 the least common denominator is at least (m+n)n(2n+m)(n-m)/36, which is http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/comega.gif(n4). The smallest couple solutions are {21, 44, 77}/84, {24, 50, 75}/120, {35, 72, 90}/280, {132, 273, 364}/858, {280, 585, 936}/1260, {220, 456, 627}/1320, ... |
||||||
Title: Re: It's a Truel World Post by ThudanBlunder on Feb 3rd, 2009, 2:01pm on 02/03/09 at 13:28:59, Eigenray wrote:
I thought I had covered the (well-known) assumptions in my first post. Maybe not. Never mind. Funny, my English teacher never liked 'get' either. :'( Your analysis looks interesting. |
||||||
Title: Re: It's a Truel World Post by ThudanBlunder on Feb 4th, 2009, 12:55pm Eigenray, your mathematical dexterity constantly amazes me....... on 02/03/09 at 13:28:59, Eigenray wrote:
.......but are you concluding that when A(s) = B(s) = C(s) = 1/3, it is always better to miss, even allowing irrational a,b,c? You see, I have an unposted proof in my margin here that, when it is better to shoot at C, there exist irrational a,b,c such that A(s) = B(s) = C(s) = 1/3 |
||||||
Title: Re: It's a Truel World Post by Eigenray on Feb 4th, 2009, 3:10pm on 02/04/09 at 12:55:30, ThudanBlunder wrote:
Yes, assuming a < b < c. The rational points are dense on the curve A(s) = B(s) = C(s) so restricting to them doesn't change much. It follows from the parametrization you gave as well: Quote:
which gives A*-A = (1-G)(4+G)(1-2G) / [3(2-G)(G2-3G+5)] > 0 for G in (3-http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif7, 1/2). Quote:
I'm not sure what you mean by that. "When it is better to shoot at C" depends on the values of a,b,c. |
||||||
Title: Re: It's a Truel World Post by ThudanBlunder on Feb 4th, 2009, 3:50pm on 02/04/09 at 15:10:26, Eigenray wrote:
Well, there is no point in shooting at somebody who is shooting into the air. (Unless he is also whistling Dixie out of tune, say. In which case, be certain to hire a sure shot.) So it must mean shooting at the sure shot. In other words, when (using your notation) c[c(1 - b)2 - b] as established in an earlier post. And when c = 1 this is represented by the blue shaded area in the previous diagram. Will get back to you. Now, in which book did I write in the margin........ |
||||||
Title: Re: It's a Truel World Post by ThudanBlunder on Feb 5th, 2009, 4:21pm As a counterexample (that even towr himself would be proud of) is worth a million 'we get's, consider a = 0.017122... b = 0.020405... c = 0.042448.... where the original radicals have been converted to decimals. And observe that i) a < b < c ii) A(s)* = B(s)* = C(s)* = 1/3 iii) a < 1 - bc/{[c(1 - b)]2 + (1 - c)b2} as in my previous post iv) (http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif10 - 2)/3 = 0.387426... < G = a/c(1 - a) = 0.410384... < http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif2 - 1 = 0.414214... This last constraint replaces 3 - http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif7 http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/leqslant.gif G < 1/2 when helping B (shall we call it) is preferable. It is, in any case, stricter than 3 - http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif7 http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/leqslant.gif G < 1/2 and entirely enclosed by it. |
||||||
Title: Re: It's a Truel World Post by Eigenray on Feb 5th, 2009, 4:40pm on 02/05/09 at 16:21:21, ThudanBlunder wrote:
But your question was about A(s) = B(s) = C(s) = 1/3, not A*(s). |
||||||
Title: Re: It's a Truel World Post by ThudanBlunder on Feb 5th, 2009, 5:19pm on 02/05/09 at 16:40:08, Eigenray wrote:
That's true. Careless of me. I thought my intended meaning was clear. That is, (again, using your notation) when A(s) > A(s)* we seek equal opportunity of survival with A(s) = B(s) = C(s) = 1/3 and when A(s) < A(s)* we seek equal opportunity of survival with A(s)* = B(s)* = C(s)* = 1/3 I don't think there are any rational solutions for the second part. If so, rewriting part of the demo will be a problem. |
||||||
Title: Re: It's a Truel World Post by Eigenray on Feb 5th, 2009, 5:58pm Okay.... Solving A* = B* gives c = a ( a2(2b-1) - b2(a-1)2 ) / [ (1-a)(2a2 + ab - 4a2b - b2 + ab2) ] Solving B* = C* gives a4 - b*(2a3 + 4a4) + b2(12a3-5a2) + b3*(8a4-17a3+9a2) + b4*(a4 - 5a3 + 9a2 - 7a + 2) = 0. Using Mathematica's root numbering, let b(a,k) = Root[(...)/.b->#&, k]. Define L = 0.1067220725 H = 0.8932779253 M = 0.2631209943 Then: b(a,1) and b(a,2) are always real, but only in [0,1] for L < a < H. However, b(a,1) < a on this interval, while we only have a < b < c < 1 with b = b(a,2) for L < a < M. b(a,3) and b(a,4) are real for a < L or a > H. But b(a,3) < a on both, and b(a,4) < a for a > H. For a < L, we have a < b < c < 1 with b = b(a,4). Therefore let b(a) be b(a,4) for a < L, and b(a,2) for a > L. Then 0 < a < b < c < 1 for 0 < a < M. Now it turns out that A* - A > 0 only for a < 0.1188376889. So: The solutions to A* = B* = C* = 1/3, a < b < c, are parametrized by 0 < a < M = 0.2631209943. Under this condition, A should shoot and C when a < 0.1188376889, and miss otherwise. Attached are the plots of a,b,c in (red, green, blue) along the two curves: on the left is A(s) = B(s) = C(s) = 1/3, and on the right is A*(s) = B*(s) = C*(s) = 1/3. |
||||||
Title: Re: It's a Truel World Post by Eigenray on Feb 5th, 2009, 6:10pm on 02/05/09 at 16:21:21, ThudanBlunder wrote:
Are you sure about this? For these values I get (A*(s), B*(s), C*(s)) = (0.369689, 0.259028, 0.371283) and my formulas are the same as the ones in your second post (switching a and c). |
||||||
Title: Re: It's a Truel World Post by ThudanBlunder on Feb 5th, 2009, 6:36pm on 02/05/09 at 18:10:39, Eigenray wrote:
As those equations looked a bit messy to deal with, I parameterized them (using my notation) into A(s)* = 1/(G + 1)(FH + H + 1) B(s)* = [H(F2 + F + 1) - FG]/(F + 1)(FH + H + 1) and they both came out to exactly 1/3 on my humble Maplesoft calculator. :-/ And the condition to help B became F < G(GH + G + 1)/H(GH + G + H) which also checked out. |
||||||
Title: Re: It's a Truel World Post by Eigenray on Feb 5th, 2009, 6:46pm on 02/05/09 at 18:36:00, ThudanBlunder wrote:
That's what I get as well but, using your notation, (c,b,a) = (0.017122, 0.020405, 0.042448), (F,G,H) = (0.853726, 0.410391, 0.490719), A* = 0.371283, B* = 0.259028. |
||||||
Title: Re: It's a Truel World Post by ThudanBlunder on Feb 5th, 2009, 8:22pm on 02/05/09 at 18:46:44, Eigenray wrote:
I will have to have another look. (But from tomorrow I may for a few weeks be confined to lurking.) I do know that I started out with F = 3/5 and when we consider A(s) = B(s) = C(s) = 1/3 G = 2/5 H = 8/7 subject to 3 - http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif7 http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/eqslantless.gif G < 1/2 (as in my first post) And when we consider A(s)* = B(s)* = C(s)* = 1/3 we G = (http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif8593 - 73)/48 = 0.410384... H = (15http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif8593 - 455)/1328 = 0.704425 subject to (http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif10 - 2)/3 http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/eqslantless.gif G < http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/surd.gif2 - 1 So perhaps our G matches, allowing rounding error. But not our F or H. However, unlike yours, my F is right by definition! :P |
||||||
Title: Re: It's a Truel World Post by Eigenray on Feb 5th, 2009, 11:37pm I see, it looks like your b is just off; it should be 0.0290331 or so. But that doesn't really matter. Using F,G,H really simplifies things! I found the following rational point: a = 1780225612071980440487233690 / 42514698180175799467200302197 b = 890112806035990220243616845 / 12666774444361618608640463004 c = 326459223625633611840607911167657350 / 3023918895788355583589056125975619389 (a,b,c) = (0.0418732, 0.0702715, 0.107959) Needless to say, it was not by brute force. There is an elliptic curve involved. Solving A*=1/3 for F, F = (2-G-H-GH)/((1+G)H), and then solving B*=1/3 for H shows that D2 = G4 + 12G - 4 is a perfect square. Setting X = 2(D+G2), Y = 12 + 4G(D+G2) puts us in normal form E : Y2 = X3 + 16X + 144. This curve has rank 2, generated by P=(-4,4) and Q=(0,12), and no torsion. So every rational point on E is of the form nP + mQ for some integers m,n. For each point on E, we get G, and two choices for H, giving two possibilities for (a,b,c); i.e., there are two rational functions from E to triples (a,b,c) with A*=B*=C*=1/3. It turns out they only differ by precomposition with the involution R <-> -Q-R of E, so we can fix either of them WLOG. Now, not all points satisfy 0 < a < b < c < 1, and A* > A. The "smallest" one that does is -3P + 5Q = ( -52236003526944484 / 33628523310064225, 66246444689296793086565564 / 6166826011846075282843375 ), which corresponds to the solution listed above. In order of increasing maximum denominator of (a,b,c), the "valid" points are -3P+5Q, 2P+7Q, -5P-13Q, 12P+8Q, 5P-12Q, ... These points correspond to solutions having maximum denominators with log10 rounding to 36, 43, 120, 137, 142, ... so you would need very large dice. The base-10 logs of the least common denominators round to 84, 101, 292, 331, 349, ... So, if the players are to be equally likely to survive when A shoots at C, then they need a die with more faces than there are particles in the universe! Mathematica notebook attached. [link=http://magma.maths.usyd.edu.au/calc/]Magma[/link] commands: Code:
Code:
|
||||||
Title: Re: It's a Truel World Post by ThudanBlunder on Feb 6th, 2009, 1:01am Great stuff!! |
||||||
Powered by YaBB 1 Gold - SP 1.4! Forum software copyright © 2000-2004 Yet another Bulletin Board |