This is the agent-based implementation of the model described in Smaldino & Turner (2020) "Covert signaling is an adaptive communication strategy in diverse populations"
See the current version of the paper for the current teacher selection algorithm.
The interaction partner selection will use the current teacher selection algorithm (which will be replaced itself with an alternative). Partner selection will use a normalized, homophily-weighted similarity score to determine the probability agent i selects agent j as a partner: Pr(i chooses j) = (1 + w(a_ij + a_ji))/ sum_jā i (1 + w(a_ij + a_ji)).
It seems we can get rid of the 1 + . This is a holdover from our calculation of the chance agents "collaborate" as I called it, which was (1 + w(a_ij + a_ji))/2.
Currently have a rogue branch that is messing with delta. I think it can just be deleted and we can revert to the master branch since we never got to do the sensitivity checks for delta, and I was confused about how delta was being set because I did it in a confusing way.
This will be the first and so far only test for social learning. The idea is we can calculate the expected number of times a particular learner agent will switch to its teacher's strategy. This should occur with a frequency equal to the update probability.
Need to make sure that it is possible to run all .
First explain general structure that there is code for model, experiments, and analysis, plus notebooks demonstrating the code in more detail. But these are not super useful, and maybe better not included if the alternative is a messy notebook with broken code, error/warning messages, etc. Better to cleanly explain the code in one place, the README. So I will start by removing the notebooks from git tracking and writing the following.
Document-driven development for two scripts. One creates all necessary output directories, submits all jobs to slurm cluster. The second takes results in same directory structure and creates all figures in a new Figures/ directory. Explain how these (will) work, then implement (separate issue).
The rest would just note how different agent attributes, member functions in model.py and experiments in experiments.py connect to what's presented in the paper.
I don't think it's necessary to explain figures.py, just note that the functions used there can be inferred from usage in the script and inspecting the functions themselves.
A few values of K for basic results. Maybe K={3, 9, 21, 101} and make the default K=9. Re-run all experiments with K=9. Won't be too hard to do and it may make the results sharper, which would be nice.