I recently saw “The Good, The Bad, & The Weird”, (side note, I’d rate the movie 1/5 stars, it didn’t hold my interest), but at the end of the movie there is a three way duel. I was intrigued by the strategy that would take place in a three way duel, provided the right groundwork is set up. (The duel in the movie is not really that spectacular.)
The Rules:
Duelist A has a rifle, duelist B has two pistols, and duelist C has a single handgun (gun type doesn’t really matter). Assume that all the players shoot to kill and have perfect aim, except player B who cannot aim in two directions at once. For the sake of easy math, let’s say that if player B points a gun at each opponent but only looks in one direction he will kill the person he looks at and has a 30% chance of killing the other player. (I postulate this 30% chance as an option, but I will not take it any further in my analysis. The added complexity might change the strategy, but I do not feel it’s worth exploring for me at this time.) If player B aims at both opponents with peripheral vision, he has a 50% chance of hitting both opponents. Assume also that all the players are capable of shooting at least once in the duel and I see no reason for a limitation on ammo, as they have perfect aim. The person who does not get shot wins the game. It’s possible for the game to have no winners, in fact, it seems likely.
The Theory:
Since player B has two weapons, it makes sense that he would point a gun at both opponents in the best scenario he would kill both. This means that each opponent has a 50% chance of being killed. Players A and C then have quite a bit of incentive to both fire at player B. But since both A and C have 100% chance of killing player B, one of the bullets would be wasted and they would kill each other with the second shot (provided they survived the shots from B). With a 50% chance of surviving a shot from B it would be more beneficial to kill off the person with a 100% chance of killing you, so A and C should really shoot at each other. If they shoot at each other, no one shoots at B and B would survive.
The Hypothesis:
My original assumption in creating this scenario was that it would be more beneficial for a player with one gun to shoot at the other player with one gun than to shoot at the player with two guns, which seems like the first logical choice. This strategy is only beneficial, however, when one of the one gun players fires at the two gun player.
As I continue to think this over it looks like a game where there can really be no winner, except maybe B. But what if each character had 90% accuracy rather than 100%. In stating this I realize that perhaps a limitation on ammo could be necessary, at which time I might suggest moving to a 2 shot per person system where multiple winners would be accepted. It would depend on how the numbers work out.
The Math:
Originally I planned on writing up the theory of strategy that one could use in this situation, but as I put my thoughts onto paper I realized that a simulation would be really helpful in finding out what strategy actually worked for this. So I decided to do some math.
For experiment one I assumed that player A would always shoot player C and that player C would shoot randomly at the other players. Using a coin I flipped for C, heads meant he shot at A, tails was a shot at B. I then flipped the coin for B twice, once for a shot at each opponent, where heads was a hit and tails was a miss. I did this ten times, my results were unsatisfactory.
1: A shoots @C; B misses A, B misses C; C shoots @A; B wins;
2: A shoots @C; B misses A, B misses C; C shoots @A; B wins;
3: A shoots @C; B hits A, B hits C; C shoots @A; B wins;
4: A shoots @C; B hits A, B misses C; C shoots @A; B wins;
5: A shoots @C; B hits A, B misses C; C shoots @A; B wins;
6: A shoots @C; B misses A, B misses C; C shoots @B; A wins;
7: A shoots @C; B hits A, B misses C; C shoots @A; B wins;
8: A shoots @C; B misses A, B hits C; C shoots @A; B wins;
9: A shoots @C; B misses A, B misses C; C shoots @A; B wins;
10: A shoots @C; B hits A, B hits C; C shoots @A; B wins;
Nine of the ten matches were won by B. The one other match was won by A. This led to a facepalm realization I didn’t discuss yet. If A decidedly shoots C, C is incapable of winning. That said, whoever A and C shoot can’t win.
This required more randomization than I was willing to flip for, so I headed to the language I know best, (which isn’t saying much) PHP.
After some tweaking and experimenting I formulated the following code:
$i = 0; //loop counter
$j = 0; //everyone is dead counter
$a - 0; //A survives counter
$b = 0; //B survives counter
$c = 0; //C survices counter
$t = 0; //counter for two living at the end
while($i != 9000) {
//assume one shot each, except B who gets two simultaneous shots.
$i++;
$Arand = rand(1,2); //1 is a hit, 2 is a miss
$Brand1=rand(1,2); //1 is a hit, 2 is a miss
$Brand2=rand(1,2); //1 is a hit, 2 is a miss
$Crand = rand(1,2); //1 is a hit, 2 is a miss
//set all players to alive
$A = "alive";
$B = "alive";
$C = "alive";
//find out who gets shot and dead them
if($Arand==1){
$B = "dead";
} else {
$C = "dead";
}
if($Crand==1){
$A = "dead";
} else {
$B = "dead";
}
if($Brand1==1){
$A = "dead";
}
if($Brand2==1){
$C = "dead";
}
//is everyone dead? at least one person will die
if($A==$B&&$B==$C){
$j++;
}
//unlikely but possible that two people live (more likely than I first thought)
if(($A=='alive'&&$B=='alive')||($A=='alive'&&$C=='alive')||($C=='alive'&&$B=='alive')){
$t++;
}
//add up the living people
//display their status in color
if($A == 'alive'){
$a++;
echo "<font color='green'>".$A."</font> ";
} else {
echo "<font color='red'>".$A."</font> ";
}
if($B == 'alive'){
$b++;
echo "<font color='green'>".$B."</font> ";
} else {
echo "<font color='red'>".$B."</font> ";
}
if($C == 'alive'){
$c++;
echo "<font color='green'>".$C."</font> ";
} else {
echo "<font color='red'>".$C."</font> ";
}
//line break
echo "<br />";
}
//total the stats, who is it better to be?
echo "All die in ".$j." battles, thats ".(($j/$i)*100)." percent.<br />";
echo "Survival rates for <br />A: ".$a." battles or ".(($a/$i)*100)." percent <br />B: ".$b." battles or ".(($b/$i)*100)." percent <br />C: ".$c." battles or ".(($c/$i)*100)." percent <br />";
echo "in ".$t." battle(s) two people lived. Or ".(($t/$i)*100)." percent.";
I ran the code a number of times with different loop values. Lower loop values led to a little more variation, but that was to be expected with a smaller sample size.
Finally I settled on 9000 games and gave it a run, here’s my result:
All die in 2828 battles, thats 31.422222222222 percent.
Survival rates for
A: 2243 battles or 24.922222222222 percent
B: 2248 battles or 24.977777777778 percent
C: 2243 battles or 24.922222222222 percent
in 562 battle(s) two people lived. Or 6.2444444444444 percent.
These numbers are fairly consistent across multiple runs of the script. They also surprised me.
According to these numbers everyone died in 31% of the games. That means in ~70% of the games there was a winner. In this 70%, each player survived about 24% of the time. My original thought was that one player might have a competitive advantage over a different player, but this seems to indicate the survival rates for all are the same.
Granted, this “study” lacks any personal bias or thought process when all the decisions are made randomly, but I wanted to know if there was any value in choosing one player over another. In a completely randomized world, there isn’t.
The Conclusion:
There are a lot more potential variations of this game that could be tried, but I feel that my testing worked well for my limited purposes. As I view the final results of my code, I can’t help but compare this type of game to a three way game of paper, scissors, rock.* It might be interesting to look at the scenario from that viewpoint more closely and compare two simulations, but I won’t be doing that.
Overall this was a fun little project to distract from the daily monotony from which the mind rebels.
*Yes, I know that some people have learned the game as “rock, paper, scissors” but as a Communication Specialist, I am forced to disagree, purely on a syllabic count. Paper and scissors both have two syllables, which means they take longer to say and are not as emphatic. Rock, on the other hand is a shorter word with one syllable and can produce a sharp punctuation of sound, which lends itself nicely to a climactic unveiling of weapon choice. You’re welcome to use whichever is more comfortable to you personally, but I can’t help but point out that there is an emotional and atmospheric reason for choosing the order of the words. Choose correctly!