In [1]:
import sys
import seaborn as sns
sys.path.append("..")
%matplotlib inline
sns.set(rc={'image.cmap': 'Purples_r'})
In [2]:
import naminggamesal.ngpop as ngpop
Let's create a population. Agent creation is here dealt with automatically. Still, it is possible to manually add or remove agents (Hence the IDs of the agents), what will be seen later.
In [28]:
pop_cfg={
'voc_cfg':{
'voc_type':'matrix',
'M':5,
'W':10
},
'strat_cfg':{
'strat_type':'naive',
'vu_cfg':{'vu_type':'BLIS_epirob'}
},
'interact_cfg':{
'interact_type':'speakerschoice'
},
'nbagent':5
}
testpop=ngpop.Population(**pop_cfg)
testpop
Out[28]:
In [29]:
print(testpop)
print
testpop.visual(vtype="agents")
In [32]:
testpop.play_game(100)
In [33]:
print(testpop)
testpop.visual()
In [11]:
testpop.visual(vtype="agents")
In [15]:
testpop._agentlist[0]._vocabulary._content
Out[15]:
In [28]:
testpop._agentlist[0]._vocabulary.add(0,0,0.5)
In [ ]: