Four Quarters is a game of chance played with four 25-cent coins (quarters). Two players, A and B, each flip two coins every round. Based on the results of their own two coins, each player gains or loses points according to the tables below.
A two-coin result is distinguished only by its number of heads; Heads/Tails and Tails/Heads are treated as the same. So each player’s result is one of HH (2 heads), HT (1 head), or TT (0 heads).
Player A’s payoff (rows: A’s result, columns: B’s result)
| A / B | B: HH | B: HT | B: TT |
|---|---|---|---|
| A: HH | 1 | 1 | 2 |
| A: HT | 0 | 0 | 1 |
| A: TT | -1 | 0 | 0 |
Player B’s payoff (rows: A’s result, columns: B’s result)
| A / B | B: HH | B: HT | B: TT |
|---|---|---|---|
| A: HH | 0 | -1 | -1 |
| A: HT | 1 | 0 | 0 |
| A: TT | 2 | 0 | -1 |
As you can see, the odds are stacked in Player A’s favor. At the start of the game both players have 0 points, and points accumulate as the game progresses. When the game ends, the player with more points wins.
Write a program that determines the probability that Player A wins, Player B wins, or the game ties after a given number of rounds. Assume the coins are fair, i.e. heads and tails are equally likely.
There is no input for this problem.
Output a table listing the probability that Player A wins, Player B wins, or the game ties after each round, for rounds 1 through 20. Express each probability as a percentage with 4 digits after the decimal point.
Print the header line Round A wins B wins Tie first, then one line per round from 1 to 20, each containing the round number followed by the three probabilities. Match the exact spacing and formatting shown in the example output.