Evoke

Evoke: A Python package for evolutionary signalling games - Published in JOSS (2024)

https://github.com/signalling-games-org/evoke

Science Score: 100.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 8 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    1 of 3 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Scientific Fields

Mathematics Computer Science - 84% confidence
Last synced: 6 months ago · JSON representation ·

Repository

A Python package for evolutionary signalling games

Basic Info
Statistics
  • Stars: 3
  • Watchers: 2
  • Forks: 1
  • Open Issues: 2
  • Releases: 1
Created about 3 years ago · Last pushed 7 months ago
Metadata Files
Readme Contributing License Citation

README.md

Python versions PyPI version PyPI License DOI Tests

Evoke: A Python package for evolutionary signalling games

Evoke is a Python library for evolutionary simulations of signalling games. It offers a simple and intuitive API that can be used to analyze arbitrary game-theoretic models, and to easily reproduce and customize well-known results and figures from the literature.

Evoke comprises a library of methods from evolutionary game theory evoke/src/ and an ever-growing collection of user-friendly examples evoke/examples/.

Online tutorial

See the interactive tutorial on Google Colab.

Requirements

Evoke currently requires Python versions 3.9-3.12. Further requirements are listed in pyproject.toml.

Installation

Install with pip: pip install evoke_signals.

Basic usage

Creating your own signalling games

Creating and running your own simulations requires you to specify payoff matrices, player strategies, and learning or evolutionary dynamics. See the tutorial or the documentation for details and examples.

Recreating figures from the literature

You can also recreate figures from the signalling game literature. For example, suppose you want to recreate Figure 1.1 from page 11 of Signals (Skyrms 2010). The figure depicts the replicator dynamics of a population repeatedly playing a two-player cooperative game where each agent in the population either always plays sender or always plays receiver. Senders observe one of two randomly chosen states of the world and produce one of two signals. Receivers observe the signal and produce one of two acts. If the act matches the state, both players gain a payoff.

The x-axis gives the proportion of receivers mapping the first signal to the second act and the second signal to the first act. The y-axis gives the proportion of senders mapping the first state to the second signal and the second state to the first signal.

The points at which the population is achieving the greatest coordination are thus (0,0) and (1,1), so we would expect to see the arrows in the grid pointing towards those two corners. Skyrms's figure shows exactly that.

For copyright reasons we can't show the original figure here. Fortunately, recreating the figure is as easy as importing the relevant class and creating an instance of it:

from evoke.examples.skyrms2010signals import Skyrms2010_1_1 fig1_1 = Skyrms2010_1_1()

Example of Skyrms 2010 Figure 1.1

If you check page 11 of Signals you will see this plot closely matches Skyrms's Figure 1.1.

Recreating figures from the literature with different parameters

One of the useful features of Evoke is that it allows you to re-run existing figures with different data. In this way you can see how the results of a simulation would change if the parameters were tweaked.

Let's take Figure 3.3 of Skyrms (2010:40) as an example. The figure depicts the mutual information between signal and state over successive trials of a two-player cooperative game in which agents learn via reinforcement. There are two states, two signals and two acts. Typically the mutual information will increase over time as the agents learn to use specific signals as indicators of specific states.

Once again we can create the figure just by creating an instance of the object. Instead of the 100 iterations Skyrms uses, we will run the model for 1000 iterations:

from evoke.examples.skyrms2010signals import Skyrms2010_3_3 fig3_3 = Skyrms2010_3_3(iterations=1000) `

Example of Skyrms 2010 Figure 3.3

Running for 100 iterations would sometimes lead to high information transmission and sometimes not, due to the stochastic nature of the simulation. In contrast, running for 1000 iterations almost always leads to appreciable information transmission, as in the figure shown here.

Figures from the literature that are currently in the Evoke library can be found in the examples/ directory.

Contributions

We welcome contributions, especially those that add to the stock of example figures. See CONTRIBUTING.md for information about contributing to Evoke.

References

Skyrms, B. (2010). Signals: Evolution, Learning, and Information. Oxford University Press. https://doi.org/10.1093/acprof:oso/9780199580828.001.0001

Owner

  • Name: Signalling Games
  • Login: signalling-games-org
  • Kind: organization

JOSS Publication

Evoke: A Python package for evolutionary signalling games
Published
November 20, 2024
Volume 9, Issue 103, Page 6703
Authors
Stephen Francis Mann ORCID
LOGOS Research Group, Universitat de Barcelona, Spain, Max Planck Institute for Evolutionary Anthropology, Leipzig, Germany
Manolo Martínez ORCID
LOGOS Research Group, Universitat de Barcelona, Spain
Editor
Vincent Knight ORCID
Tags
evolutionary game theory signalling games sender-receiver framework evolutionary simulations

Citation (CITATION.cff)

cff-version: "1.2.0"
authors:
- family-names: Mann
  given-names: Stephen Francis
  orcid: "https://orcid.org/0000-0002-4136-8595"
- family-names: Martínez
  given-names: Manolo
  orcid: "https://orcid.org/0000-0002-6194-7121"
contact:
- family-names: Martínez
  given-names: Manolo
  orcid: "https://orcid.org/0000-0002-6194-7121"
doi: 10.5281/zenodo.14185732
message: If you use this software, please cite our article in the
  Journal of Open Source Software.
preferred-citation:
  authors:
  - family-names: Mann
    given-names: Stephen Francis
    orcid: "https://orcid.org/0000-0002-4136-8595"
  - family-names: Martínez
    given-names: Manolo
    orcid: "https://orcid.org/0000-0002-6194-7121"
  date-published: 2024-11-20
  doi: 10.21105/joss.06703
  issn: 2475-9066
  issue: 103
  journal: Journal of Open Source Software
  publisher:
    name: Open Journals
  start: 6703
  title: "Evoke: A Python package for evolutionary signalling games"
  type: article
  url: "https://joss.theoj.org/papers/10.21105/joss.06703"
  volume: 9
title: "Evoke: A Python package for evolutionary signalling games"

GitHub Events

Total
  • Create event: 2
  • Release event: 1
  • Issues event: 30
  • Watch event: 2
  • Issue comment event: 15
  • Push event: 31
  • Pull request event: 2
Last Year
  • Create event: 2
  • Release event: 1
  • Issues event: 30
  • Watch event: 2
  • Issue comment event: 15
  • Push event: 31
  • Pull request event: 2

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 438
  • Total Committers: 3
  • Avg Commits per committer: 146.0
  • Development Distribution Score (DDS): 0.429
Past Year
  • Commits: 38
  • Committers: 2
  • Avg Commits per committer: 19.0
  • Development Distribution Score (DDS): 0.026
Top Committers
Name Email Commits
Manolo Martínez m****o@a****m 250
Stephen Mann s****n@g****m 187
Daniel S. Katz d****z@i****g 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 51
  • Total pull requests: 36
  • Average time to close issues: 2 months
  • Average time to close pull requests: about 1 hour
  • Total issue authors: 3
  • Total pull request authors: 3
  • Average comments per issue: 1.9
  • Average comments per pull request: 0.17
  • Merged pull requests: 36
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 15
  • Pull requests: 1
  • Average time to close issues: 16 days
  • Average time to close pull requests: 10 minutes
  • Issue authors: 2
  • Pull request authors: 1
  • Average comments per issue: 0.93
  • Average comments per pull request: 1.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • stephenfmann (45)
  • igarizio (3)
  • manolomartinez (3)
Pull Request Authors
  • stephenfmann (35)
  • manolomartinez (6)
  • danielskatz (1)
Top Labels
Issue Labels
enhancement (29) documentation (7) bug (7) good first issue (4) question (3)
Pull Request Labels

Dependencies

docs/requirements.txt pypi
  • sphinx ==7.1.2
  • sphinx-rtd-theme ==1.3.0rc1
pyproject.toml pypi
  • matplotlib >3.7.1
  • numpy >1.20
  • pygambit >=16.1.0
  • python >3.8,<3.12
  • python-ternary >1.0.0
  • scipy ^1.10.1
  • tqdm >4.50.1
setup.py pypi
  • numpy *