- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| flexible_F | ||
| two_F | ||
| .gitignore | ||
| README.md | ||
| requirements.txt | ||
A cultural evolutionary model of attribute-dependent norms on behaviors with and without direct payoffs
This is the source code for
Miyoshi, A., Ihara, Y. A cultural evolutionary model of attribute-dependent norms on behaviors with and without direct payoffs. Sci Rep (2026). https://doi.org/10.1038/s41598-026-49420-3
requirements.txt lists the dependencies for running simulations.
two_F
Analysis with two assessment strategies.
config2F.pycontains the parameter settings for which simulations are conducted.evolve2F.pycontains the function to conduct simulations.PredictedEquilibria_2F.pystores information about equilibria predicted by mathematical analysis, which is used for drawing figures.
two_F/Allgood_Allbad
Cases where F(0) is set to FAllgood and F(1) is set to FAllbad, with error rates of 0.
- Run
Allgood_Allbad.pyto conduct simulations. - Then, run
plot_Allgood_Allbad.pyto draw figures.
two_F/Allgood_X0Y1good
Cases where F(0) is set to FAllgood and F(1) is set to FX0Y1good, with error rates of 0.
- Run
Allgood_X0Y1good.pyto conduct simulations. - Then, run
plot_Allgood_X0Y1good.pyto draw figures.
two_F/Allgood_Zcommon
Cases where F(0) is set to FAllgood and F(1) is set to FZcommon, with error rates of 0.
- Run
Allgood_Zcommon.pyto conduct simulations. - Then, run
plot_Allgood_Zcommon.pyto draw figures.
two_F/effect_of_error
Cases where F(0) is FAllgood and F(1) is FZcommon with non-zero error rates.
- Run
effect_of_error.pyto conduct simulations. - Then, run
plot_effect_of_error.pyto draw figures.
flexible_F
Analysis concerning continuously varying assessment strategies.
config.pycontains the parameter settings for which simulations are conducted.evolve.pycontains the function to conduct simulations.
flexible_F/demonstrate
- Run
demonstrate.pyto conduct simulations and draw figures displaying each run.- At that time,
heatF.pyis used to draw figures.
- At that time,
flexible_F/from_monomorphic
Simulations with initial states where individuals share the same assessment parameters.
- Run
from_monomorphic.pyto conduct simulations. - Run
discrepancy.pyto calculate and save values of Discrepancy. - Run
discrepancy_plot.pyto draw figures and perform permutation tests.
flexible_F/from_uniform
Simulations with initial states where assessment parameters of individuals are drawn from a uniform distribution.
- Run
from_uniform.pyto conduct simulations. - Run
circularvariance_tocsv.pyand thencircularvariance_graph.pyto calculate the resulting values of circular variance and draw a figure. - Run
mmWNfit.pyto fit mixture models to the simulation results. - Run
scatter_u.pyto draw other figures.
flexible_F/from_uniform_envchange
Simulations incorporating a shift of socioeconomic environment.
- Run
from_uniform_envchange.pyto conduct simulations. - Run
plot_ubar.pyto draw a figure of average assessment parameters. - Run
rf_accuracy.pyto conduct classifier two-sample tests and visualize the result. - Run
export_pvalues.pyto export p-values in csv file format.