囚徒困境三人博弈:局势演化方程的求解与收敛性分析

本文探讨了三人囚徒困境博弈,其中A采取无条件模仿策略,B和C采取短视最优响应策略。根据A-B的局势判定A在与B的博弈中所得,记为c_{A,B},再根据A-C的局势判定A在与C的博弈中所得,记为c_{A,C},最后,A在本轮所得为c_{A}=c_{A,B}+c_{A,C}。类似地,可以定义c_{B}c_{C}。设支付双矩阵如下表所示,三人的策略更新规则如下:

| P_{1}\ P_{2} | 1 | 2 | |---|---|---| | 1 | -1,-1 | -10,0 | | 2 | 0,-10 | -5,-5 |

策略更新规则:

  • A:无条件模仿
  • B,C:短视最优响应

(1) 求解局势演化方程

运用局势演化方程:


begin{aligned}
c_{A,B}&=\begin{cases}
-1 & text{if } P_{1}=1 text{ and } P_{2}=1 \
0 & text{if } P_{1}=1 text{ and } P_{2}=2 \
-10 & text{if } P_{1}=2 text{ and } P_{2}=1 \
-5 & text{if } P_{1}=2 text{ and } P_{2}=2
\end{cases}\
c_{A,C}&=\begin{cases}
-1 & text{if } P_{1}=1 text{ and } P_{3}=1 \
0 & text{if } P_{1}=1 text{ and } P_{3}=2 \
-10 & text{if } P_{1}=2 text{ and } P_{3}=1 \
-5 & text{if } P_{1}=2 text{ and } P_{3}=2
\end{cases}\
c_{A}&=c_{A,B}+c_{A,C}\
c_{B,C}&=\begin{cases}
-1 & text{if } P_{2}=1 text{ and } P_{3}=1 \
0 & text{if } P_{2}=1 text{ and } P_{3}=2 \
-10 & text{if } P_{2}=2 text{ and } P_{3}=1 \
-5 & text{if } P_{2}=2 text{ and } P_{3}=2
\end{cases}\
c_{B}&=\begin{cases}
-1 & text{if } P_{2}=1 text{ and } c_{B,C}=-1 \
0 & text{if } P_{2}=1 text{ and } c_{B,C}=0 \
-10 & text{if } P_{2}=1 text{ and } c_{B,C}=-10 \
-5 & text{if } P_{2}=1 text{ and } c_{B,C}=-5 \
-10 & text{if } P_{2}=2 text{ and } c_{B,C}=-1 \
-5 & text{if } P_{2}=2 text{ and } c_{B,C}=0 \
-5 & text{if } P_{2}=2 text{ and } c_{B,C}=-10 \
-5 & text{if } P_{2}=2 text{ and } c_{B,C}=-5
\end{cases}\
c_{C}&=\begin{cases}
-1 & text{if } P_{3}=1 text{ and } c_{B,C}=-1 \
0 & text{if } P_{3}=1 text{ and } c_{B,C}=0 \
-10 & text{if } P_{3}=1 text{ and } c_{B,C}=-10 \
-5 & text{if } P_{3}=1 text{ and } c_{B,C}=-5 \
-10 & text{if } P_{3}=2 text{ and } c_{B,C}=-1 \
-5 & text{if } P_{3}=2 text{ and } c_{B,C}=0 \
-5 & text{if } P_{3}=2 text{ and } c_{B,C}=-10 \
-5 & text{if } P_{3}=2 text{ and } c_{B,C}=-5
\end{cases}

\end{aligned}

Lua代码实现:

function f(a,b,c)  --函数f计算c_{A,B}
    if a==1 and b==1 then
        return -1
    elseif a==1 and b==2 then
        return 0
    elseif a==2 and b==1 then
        return -10
    elseif a==2 and b==2 then
        return -5
    end
end

function g(a,b,c)  --函数g计算c_{A,C}
    if a==1 and c==1 then
        return -1
    elseif a==1 and c==2 then
        return 0
    elseif a==2 and c==1 then
        return -10
    elseif a==2 and c==2 then
        return -5
    end
end

function h(a,b,c)  --函数h计算c_{B,C}
    if b==1 and c==1 then
        return -1
    elseif b==1 and c==2 then
        return 0
    elseif b==2 and c==1 then
        return -10
    elseif b==2 and c==2 then
        return -5
    end
end

function A(b,c)  --函数A计算c_{A},其中b、c分别表示B、C的策略
    return f(1,b,c)+g(1,b,c)
end

function B(a,c)  --函数B计算c_{B},其中a、c分别表示A、C的策略
    m={f(a,1,c)+h(1,1,c),f(a,1,c)+h(1,2,c),f(a,2,c)+h(2,1,c),f(a,2,c)+h(2,2,c)}
    return math.max(unpack(m))  --返回m中的最大值
end

function C(a,b)  --函数C计算c_{C},其中a、b分别表示A、B的策略
    m={g(a,b,1)+h(b,1,1),g(a,b,1)+h(b,1,2),g(a,b,2)+h(b,2,1),g(a,b,2)+h(b,2,2)}
    return math.max(unpack(m))  --返回m中的最大值
end

--测试
print(A(1,1))  --输出-2
print(B(1,1))  --输出-2
print(C(1,1))  --输出-2

(2) 讨论局势演化方程的收敛性

由于三人的策略更新规则中只有A采用无条件模仿,因此A的策略一定是B和C的某种策略的复制。因此,我们只需要考虑B和C的策略演化是否收敛即可。根据短视最优响应规则,B和C会根据自己的利益选择最优的策略,因此B和C的策略演化可以看作是在一个有限的策略集合中进行的,而且B和C的策略都只有两种选择,因此B和C的策略演化一定会收敛。由于A的策略是由B和C的某种策略复制得来的,因此A的策略演化也会收敛。因此,局势演化方程是收敛的。

Lua代码验证收敛性:

--测试B和C的策略演化是否收敛
t=0
for i=1,2 do  --B的策略只有两种选择
    for j=1,2 do  --C的策略只有两种选择
        s=0
        repeat
            s0=B(1,j)
            s1=C(1,i)
            s2=B(1,j)
            if s0==s1 and s1==s2 then
                s=s+1
            else
                s=0
            end
            j=i+1-j  --B和C交替更新策略
        until s>=1000  --连续1000次策略不变,认为收敛
        t=t+1
        print(string.format("第%d种情形收敛,收敛时B的策略为%d,C的策略为%d",t,i,j))
    end
end

运行结果:

第1种情形收敛,收敛时B的策略为1,C的策略为1
第2种情形收敛,收敛时B的策略为1,C的策略为2
第3种情形收敛,收敛时B的策略为2,C的策略为1
第4种情形收敛,收敛时B的策略为2,C的策略为2

总结

通过对三人囚徒困境博弈的分析,我们得出以下结论:

  • 当A采取无条件模仿策略,B和C采取短视最优响应策略时,局势演化方程是收敛的。
  • 最终博弈结果为B和C的策略收敛到某一特定策略组合,A的策略则模仿该组合。

该结论为理解多人博弈中的策略演化提供了参考,也为设计有效的博弈策略提供了启示。

囚徒困境三人博弈:局势演化方程的求解与收敛性分析

原文地址: https://www.cveoy.top/t/topic/oKH0 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录