Team members: Ray Pelupessy; Luuk van der Waals; Jeffrey Kragten
This repository contains code for the course Project Computational Science at the University of Amsterdam (2022-2023). This project focused on the persistence of sign languages under various circumstances. The basis of this model and its input variables is taken from a paper using ABM to model exactly this, though they do not include the different levels of fluency (Mudd et al. 2020).
Mudd, K., de Vos, C., & de Boer, B. (2020). An agent-based model of sign language persistence informed by real-world data. Language Dynamics and Change, 10(2), 158–187. https://doi.org/10.1163/22105832-bja10010
The research question answered here is “What value should the assortative marriage parameter take to maximize the percentage of non-fluent signers after 50 generations?” Our hypothesis is as follows: A lower assortative marriage value results in a higher percentage of non-fluent signers
To run the model,you can simply run main.py.
$ python main.py
If you want to change the parameters, give the name of the parameters and the values to set the parameters to. The parameters and their standard values are:
Example:
$ python main.py m 0.05 0.1 0.2 0.4 0.58
This command runs the model once for each value of m with 728 agents per generation and the other standard values for the other two parameters. The results will be saved to:
/results/results_m_0.05.csv /results/results_m_0.1.csv /results/results_m_0.2.csv /results/results_m_0.4.csv /results/results_m_0.58.csv
Use graph.py to create graphs from the data in the results folder.
$ python graph.py [category] [loadfile] [*values]
$ python graph.py [category] [loadfile] [savefile] [*values]
Example:
$ python graph.py percentage_non_fluent_signers results_m_* plot 0.05 0.1 0.2 0.4 0.58
This command will make a plot of the percentage of people that can speak sign language non-fluently from the data in the following files:
/results/results_m_0.05.csv /results/results_m_0.1.csv /results/results_m_0.2.csv /results/results_m_0.4.csv /results/results_m_0.58.csv
and saves the graph in the file:
/graphs/plot.png