In [1]:
import sys
#import seaborn as sns
sys.path.append("..")
import naminggamesal
import naminggamesal.ngvoc
%matplotlib inline
#sns.set(rc={'image.cmap': 'Purples_r'})
In [2]:
import naminggamesal.ngsimu as ngsimu
Let's create an experiment
In [3]:
xp_cfg={
'pop_cfg':{
'voc_cfg':{
'voc_type':'matrix',
'M':5,
'W':10
},
'strat_cfg':{
'strat_type':'success_threshold',
'voc_update':'Minimal'
},
'interact_cfg':{
'interact_type':'speakerschoice'
},
'nbagent':10
},
'step':1
}
testexp=ngsimu.Experiment(**xp_cfg)
testexp
Out[3]:
In [4]:
print(testexp)
In [5]:
testexp.continue_exp(1)
In [6]:
print(testexp)
testexp.visual()
Let's see the evolution of this vocabulary, after 20, 50 and 100 interactions.
In [7]:
Tvec=[20,50,100]
for i in range(100):
testexp.continue_exp()
#print str(testexp._poplist[-1])
for i in Tvec:
testexp.visual(tmax=i)
We can graph measures on this population (more info on other possibile measures: Design_newMeasures.ipynb):
In [8]:
#testexp.graph("srtheo").show()
test=testexp.graph("srtheo")
test.show()
In [ ]:
In [9]:
testexp.graph("Nlinksurs").show()
testexp.graph("entropy").show()
testexp.graph("entropycouples").show()
In [ ]:
In [ ]: