env = SocialDilemma(R=1, T=2, S=-1, P=0)Social Dilemma
Class for a symmetric two-agent stateless social dilemma environment
Typical examples are the Prisoner’s Dilemma, Stag Hunt game, and the game of chicken/snowdrift/hawk-dove.
Example
env.id()'SocialDilemma_2_1_0_-1'
envSocialDilemma_2_1_0_-1
Reward matrix of agent 0:
env.RewardTensor()[0,0,:,:,0]array([[ 1., -1.],
[ 2., 0.]])
Reward matrix of agent 1:
env.RewardTensor()[1,0,:,:,0]array([[ 1., 2.],
[-1., 0.]])
env.TransitionTensor()array([[[[1.],
[1.]],
[[1.],
[1.]]]])
env.actions()[['c', 'd'], ['c', 'd']]
env.states()['.']
SocialDilemma
Symmetric 2-agent 2-action Social Dilemma Matrix Game.
source