if i understand your code right, agents
a b c d
will result in 8 pairs
a,b b,c c,d d,a b,a c,b d,c a,d
while should result in 12 pairs, also: a,c b,d c,a d,b
best way to implement is a nested loop:
for a in agents:
for b in agents:
if a!=b:
play(a, b)
if i understand your code right, agents a b c d will result in 8 pairs a,b b,c c,d d,a b,a c,b d,c a,d while should result in 12 pairs, also: a,c b,d c,a d,b
best way to implement is a nested loop:
for a in agents: for b in agents: if a!=b: play(a, b)
please review and fix