Find Graph Connections for Rock Paper Scissor game

96 Views Asked by At

I have a 2-D matrix for all participants to a number of Rock Paper Scissor (RPS) games played between a number of participants. Each row is labeled for the winning participant, and each column is labeled for the losing participant. Each cell contains the percentage of RPS wins. Here is an example for four individuals labeled a, b, c and d. Imagine that the columns are labeled the same. So a always wins against b, and wins 50% of the times against c; b wins both against c and d; c always loses against d. $$\begin{matrix} a\\b\\c\\d\\\end{matrix} \begin{bmatrix}\ 0&1&0.5&0\\ 0&0&1&1\\ 0.5&0&0&0\\ 1&0&1&0 \end{bmatrix}$$ Because some participants always play the same, I expect to find a 100% in those cells. I'm trying to determine a simple matrix manipulation to find all the participants that play the same strategy, by quickly extracting the combinations. Is there anything in graph theory that suggests a way of dealing with this problem? I've been trying to turn all cells that are not 100% into $0$, let's call this matrix A, $$\mathbf{A=} \ \begin{bmatrix}\ 0&1&0.5&0\\ 0&0&1&1\\ 0.5&0&0&0\\ 1&0&1&0 \end{bmatrix}$$ then adding $1$ to the diagonal to obtain matrix D, $$\mathbf{D=} \ \begin{bmatrix}\ 1&1&0.5&0\\ 0&1&1&1\\ 0.5&0&1&0\\ 1&0&1&1 \end{bmatrix}$$ and then multiplying with dot product matrices $D\cdot A$, $$\mathbf{D \cdot A=} \begin{bmatrix}\ 0.25&1&1.5&1\\ 1.5&0&2&1\\ 0.5&0.5&0.25&0\\ 1.5&1&1.5&0 \end{bmatrix}$$ but I'm not sure how to make progress.

1

There are 1 best solutions below

0
On

I found an answer, which is consists first in setting to 0 all elements that are not 1. This eliminates all encounters where the players played mixed strategies, leaving only plays where there is a higher chance that the players used pure strategies. Then I dot multiply the matrix by itself twice. The matrix itself gives for each row the columns corresponding to an individual playing a losing strategy. The first dot multiplication gives for each row the column corresponding to the individual twice removed from the corresponding player; the second dot multiplication gives for each row the corresponding column of the players that play the same strategy. Higher numbers would indicate that the there are more connecting paths to that player, thus higher chance of playing the same strategy. So in the example given we would first modify the initial matrix to \begin{bmatrix} 0&1&0&0\\ 0&0&1&1\\ 0&0&0&0\\ 1&0&1&0 \end{bmatrix} and after the twice multiplication is done twice we obtain as a result: \begin{bmatrix} 1&0&1&0\\ 0&1&0&0\\ 0&0&0&0\\ 0&0&1&1 \end{bmatrix} This indicates that the player in the first row has the same strategy as the player in the 3rd and 4th column; that the player in the 2nd row has the same strategy as the player in the 1st and 3rd column; that the player in the 4th row has the same strategy as the player in the 2nd column.