I am currently trying to get a hang of potential games. However I am struggeling with the Potential Functions. Especially I cant figure out how the Prisoners Dilemma Potentials are computed as it is given this question: HERE
Could anyone please explain me how @Rahul Savani arrived at this Potential Matrix ?
We want to define a function $P$ from the strategy space $\{(c, c), (q, c), (c, q), (q, q)\}$ to $\mathbb R$ such that when either player deviates unilaterally i.e., changes from $q$ to $c$, or from $c$ to $q$ while the other player keeps the same strategy, the change in the potential function is the same as the change in that players utility.
Say the row player plays $q$ and column player plays $c$ which means we are in $(q, c)$. The row player has payoff 10 and the column player has payoff 0. Now, if the column player changes her strategy from $c$ to $q$ that means we end up in $(q, q)$ and hence her payoff increases from 0 to 2. Then the potential should also increase by 2 i.e., $P((q, q)) - P((q, c)) = 2$. If instead the row player switched from $q$ to $c$, thus we go from $(q, c)$ to $(c,c)$, her payoff changes by -4 from 10 to 6 and since the potential has to reflect this it must be that $P((c,c)) - P((q, c)) = -4$.
Doing this also for the situation $(c, q)$ to $(q,q)$ we obtain the equations \begin{align*} P((q, q)) - P((q, c)) &= 2 \\ P((c,c)) - P((q, c)) &= -4 \\ P((q, q)) - P((c, q)) &= 2 \\ \end{align*}
Observe that if one of the terms is fixed, all others are determined by the equations. Also, we only care about the change in potential and not about the value of the potential.
Suppose we set $P((c, c)) = C$. Then, by the second equality, $P((q, c)) = C+4$. By the first equality we obtain $P((q,q)) = C+6$ and finally by the last equality $P((c, q)) = C+4$. In the matrix notation from Rahul Savani's post $$ \begin{pmatrix} C & C+4 \\ C+4 & C+6 \end{pmatrix} $$
by taking $C=0$ we get the same potential matrix as Rahul Savani, but we could have taken any other real value.