相关均衡Correlated Equilibrium的Matlab解法
Consider the following normal form game G G G. Your task is to find the correlated equilibrium that maximizes the sum of players’ utilities, using Linear Programming in MATLAB. In your report, you need to present the equilibrium that you have computed, the linear program that you are solving (which should include the equilibrium conditions that are satisfied), and a screenshot of your MATLAB input AND output. Use the following ordering of variables when constructing your MATLAB input:
p X A ; p X B ; p X C ; p Y A ; p Y B ; p Y C ; p Z A ; p Z B ; p Z C p_{XA}; p_{XB}; p_{XC}; p_{Y A}; p_{Y B}; p_{Y C}; p_{ZA}; p_{ZB}; p_{ZC} pXA;pXB;pXC;pYA;pYB;pYC;pZA;pZB;pZC.
A | B | C | |
---|---|---|---|
X | 10,5 | 0,6 | 0,0 |
Y | 7,7 | 0,0 | 6,0 |
Z | 0,0 | 7,7 | 5,10 |
We can formulate the correlated equilibrium as the form below, wherein v i j v_{ij} vij is the total payoff for the corresponding strategy. Then we can use the linprog in MATLAB to solve the above LP.
max ∑ i ∈ { X , Y , Z } ∑ j ∈ { A , B , C } v i , j ⋅ p i , j s . t . r o w p l a y e r : 10 p X A + 0 p X B + 0 p X C ≥ 7 p X A + 0 p X B + 6 p X C 10 p X A + 0 p X B + 0 p X C ≥ 0 p X A + 7 p X B + 5 p X C 7 p Y A + 0 p Y B + 6 p Y C ≥ 10 p Y A + 0 p Y B + 0 p Y C 7 p Y A + 0 p Y B + 6 p Y C ≥ 0 p Y A + 7 p Y B + 5 p Y C 0 p Z A + 7 p Z B + 5 p Z C ≥ 10 p Z A + 0 p Z B + 0 p Z C 0 p Z A + 7 p Z B + 5 p Z C ≥ 7 p Z A + 0 p Z B + 6 p Z C c o l u m n p l a y e r : 5 p X A + 7 p Y A + 0 p Z A ≥ 6 p X A + 0 p Y A + 7 p Z A 5 p X A + 7 p Y A + 0 p Z A ≥ 0 p X A + 0 p Y A + 10 p Z A 6 p X B + 0 p Y B + 7 p Z B ≥ 5 p X B + 7 p Y B + 0 p Z B 6 p X B + 0 p Y B + 7 p Z B ≥ 0 p X B + 0 p Y B + 10 p Z B 0 p X C + 0 p Y C + 10 p Z C ≥ 5 p X C + 7 p Y C + 0 p Z C 0 p X C + 0 p Y C + 10 p Z C ≥ 6 p X C + 0 p Y C + 7 p Z C o t h e r c o n s t r a i n t s : ∑ i ∈ { X , Y , Z } ∑ j ∈ { A , B , C } p i , j = 1 0 ≤ p i , j ≤ 1 ∀ i ∈ { X , Y , Z } , j ∈ { A , B , C } \max \sum_{i\in\{X,Y,Z\}}\sum_{j\in\{A,B,C\}} v_{i,j}\cdot p_{i,j}\\ s.t. \quad row \ player:\\ 10p_{XA}+0p_{XB}+0p_{XC} \ge 7p_{XA}+0p_{XB}+6p_{XC}\\ 10p_{XA}+0p_{XB}+0p_{XC} \ge 0p_{XA}+7p_{XB}+5p_{XC}\\ 7p_{YA}+0p_{YB}+6p_{YC} \ge 10p_{YA}+0p_{YB}+0p_{YC}\\ 7p_{YA}+0p_{YB}+6p_{YC} \ge 0p_{YA}+7p_{YB}+5p_{YC}\\ 0p_{ZA}+7p_{ZB}+5p_{ZC} \ge 10p_{ZA}+0p_{ZB}+0p_{ZC}\\ 0p_{ZA}+7p_{ZB}+5p_{ZC} \ge 7p_{ZA}+0p_{ZB}+6p_{ZC}\\ column \ player:\\ 5p_{XA}+7p_{YA}+0p_{ZA} \ge 6p_{XA}+0p_{YA}+7p_{ZA}\\ 5p_{XA}+7p_{YA}+0p_{ZA} \ge 0p_{XA}+0p_{YA}+10p_{ZA}\\ 6p_{XB}+0p_{YB}+7p_{ZB} \ge 5p_{XB}+7p_{YB}+0p_{ZB}\\ 6p_{XB}+0p_{YB}+7p_{ZB} \ge 0p_{XB}+0p_{YB}+10p_{ZB}\\ 0p_{XC}+0p_{YC}+10p_{ZC} \ge 5p_{XC}+7p_{YC}+0p_{ZC}\\ 0p_{XC}+0p_{YC}+10p_{ZC} \ge 6p_{XC}+0p_{YC}+7p_{ZC}\\ other \ constraints:\\ \sum_{i\in\{X,Y,Z\}}\sum_{j\in\{A,B,C\}} p_{i,j}=1\\ 0\le p_{i,j} \le 1 \quad \forall i\in\{X,Y,Z\},j\in\{A,B,C\} max∑i∈{ X,Y,Z}∑j∈{ A,B,C}vi,j⋅pi