tomsup

tomsup 👍 Theory of Mind Simulation using Python. A package that allows for easy agent-based modelling of recursive Theory of Mind

https://github.com/kennethenevoldsen/tomsup

Science Score: 67.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 2 DOI reference(s) in README
  • Academic publication links
    Links to: springer.com, plos.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.7%) to scientific vocabulary

Keywords

mind python theory tutorials
Last synced: 4 months ago · JSON representation ·

Repository

tomsup 👍 Theory of Mind Simulation using Python. A package that allows for easy agent-based modelling of recursive Theory of Mind

Basic Info
Statistics
  • Stars: 68
  • Watchers: 3
  • Forks: 8
  • Open Issues: 0
  • Releases: 2
Topics
mind python theory tutorials
Created over 6 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

tomsup: Theory of Mind Simulation using Python

PyPI version pip downloads Code style: black python version license github actions pytest github actions docs CodeFactor

A Python Package for Agent-Based simulations. The package provides a computational eco-system for investigating and comparing computational models of hypothesized Theory of mind (ToM) mechanisms and for using them as experimental stimuli. The package notably includes an easy-to-use implementation of the variational Bayesian k-ToM model developed by Devaine, et al. (2017). This model has been shown able to capture individual and group-level differences in social skills, including between clinical populations and across primate species. It has also been deemed among the best computational models of ToM in terms of interaction with others and recursive representation of mental states. We provide a series of tutorials on how to implement the k-ToM model and a score of simpler types of ToM mechanisms in game-theory based simulations and experimental stimuli, including how to specify custom ToM models, and show examples of how resulting data can be analyzed.

📰 News

  • 7 March 2022
  • v. 1.1.5
    • New plotting features were added
    • Speed and memory improvements as well as support for multicore simulations 🏎
    • Added workflows to ensure dependencies are being updated
    • Minor bugfixes
  • v. 1.1.0
    • A speed comparison between the matlab implementation was introduced, showing the the tomsup implementation to be notably faster.
    • An extensive testsuite was introduced, for how to run it see the FAQ.
    • Code coverage was upped to 86% and code quality was raised to A.
    • A documentation site was introduced.
    • Added continiuous integration to ensure that the package always works as intended, with support for mac, windows and linux tests.
    • A new logo was introduced 🌟
  • v. 1.0.0
    • tomsup released its first version along with a preprint on psyarxiv
    • A series of tutorials was introduced to get you started with tomsup

🔧 Setup and installation

tomsup supports Python 3.6 or later. We strongly recommend that you install tomsup from pip. If you haven't installed pip you can install it from the official pip website, otherwise, run:

bash pip install tomsup

Detailed instructions You can also install it directly from GitHub by simply running: ```bash pip install git+https://github.com/KennethEnevoldsen/tomsup.git ``` or more explicitly: ```bash git clone https://github.com/KennethEnevoldsen/tomsup.git cd tomsup pip3 install -e . ```

Getting Started with tomsup

To get started with tomsup we recommend the tutorials in the tutorials folder. We recommend that you start with the introduction.

The tutorials are provided as Jupyter Notebooks. If you do not have Jupyter Notebook installed, instructions for installing and running can be found here.

| Tutorial | Content | file name | Open with | | -------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Documentation | The documentations of tomsup | | | | Introduction | a general introduction to the features of tomsup which follows the implementation in the paper | paperimplementation.ipynb | [Open In Colab](https://colab.research.google.com/github/KennethEnevoldsen/tomsup/blob/master/tutorials/paperimplementation.ipynb) | | Creating an agent | an example of how you would create new agent for the package. | Creatinganagent.ipynb | Open In Colab | | Specifying internal states | a short guide on how to specify internal states on a k-ToM agent | specifyinginternalstates.ipynb | Open In Colab | | Psychopy experiment | An example of how one might implement tomsup in an experiment | Not a notebook, but a folder, psychopyexperiment | [Open in Github](https://github.com/KennethEnevoldsen/tomsup/tree/master/tutorials/psychopyexperiment) |

🤔 Issues and Usage Q&A

To ask report issues or request features, please use the GitHub Issue Tracker. Otherwise, please use the discussion Forums.

FAQ

How do I test the code and run the test suite? tomsup comes with an extensive test suite. In order to run the tests, you'll usually want to clone the repository and build tomsup from the source. This will also install the required development dependencies and test utilities defined in the requirements.txt. ``` pip install -r requirements.txt pip install pytest python -m pytest ``` which will run all the test in the `tomsup/tests` folder. Specific tests can be run using: ``` python -m pytest tomsup/tests/.py ``` **Code Coverage** If you want to check code coverage you can run the following: ``` pip install pytest-cov python -m pytest--cov=. ```
Does tomsup run on X? tomssup is intended to run on all major OS, this includes Windows (latest version), MacOS (Catalina) and the latest version of Linux (Ubuntu). Please note these are only the systems tomsup is being actively tested on, if you run on a similar system (e.g. an earlier version of Linux) the package will likely run there as well.
How is the documentation generated? Tomsup uses [sphinx](https://www.sphinx-doc.org/en/master/index.html) to generate documentation. It uses the [Furo](https://github.com/pradyunsg/furo) theme with a custom styling. To make the documentation you can run: ``` # install sphinx, themes and extensions pip install sphinx furo sphinx-copybutton sphinxext-opengraph # generate html from documentations make -C docs html ```

Using this Work

License

tomsup is released under the Apache License, Version 2.0.

Citing

If you use this work please cite: bibtex @article{waade2022introducing, title={Introducing tomsup: Theory of mind simulations using Python}, author={Waade, Peter T and Enevoldsen, Kenneth C and Vermillet, Arnault-Quentin and Simonsen, Arndis and Fusaroli, Riccardo}, journal={Behavior Research Methods}, pages={1--35}, year={2022}, publisher={Springer} }

Owner

  • Name: Kenneth Enevoldsen
  • Login: KennethEnevoldsen
  • Kind: user
  • Location: Aarhus
  • Company: Center for Humanities Computing Aarhus

Interdisciplinary PhD Student on representation learning in Clinical NLP and Genetics at Aarhus University and Interacting Minds Centre

Citation (citation.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: "Waade"
    given-names: "Peter"
    orcid: "https://orcid.org/0000-0002-6061-0084"
  - family-names: "Enevoldsen"
    given-names: "Kenneth"
    orcid: "https://orcid.org/0000-0001-8733-0966"
  - family-names: "Vermillet"
    given-names: "Arnault-Quentin"
  - family-names: "Simonsen"
    given-names: "Arndis"
  - family-names: "Fusaroli"
    given-names: "Riccardo"

title: "tomsup: Theory of Mind Simulation using Python"
version: 1.1.7
date-released: 2021-02-25
url: "https://github.com/KennethEnevoldsen/tomsup"

preferred-citation:
  type: article
  authors:
    - family-names: "Waade"
      given-names: "Peter"
      orcid: "https://orcid.org/0000-0002-6061-0084"
    - family-names: "Enevoldsen"
      given-names: "Kenneth"
      orcid: "https://orcid.org/0000-0001-8733-0966"
    - family-names: "Vermillet"
      given-names: "Arnault-Quentin"
    - family-names: "Simonsen"
      given-names: "Arndis"
    - family-names: "Fusaroli"
      given-names: "Riccardo"
  doi: "https://doi.org/10.3758/s13428-022-01827-2"
  journal: "Behavior Research Methods"
  month: 3
  title: "Introducing tomsup: Theory of mind simulations using Python"
  issue: 1
  volume: 1
  year: 2022

GitHub Events

Total
  • Watch event: 4
Last Year
  • Watch event: 4

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 7
  • Total pull requests: 79
  • Average time to close issues: 8 months
  • Average time to close pull requests: 4 days
  • Total issue authors: 3
  • Total pull request authors: 5
  • Average comments per issue: 1.43
  • Average comments per pull request: 0.52
  • Merged pull requests: 53
  • Bot issues: 0
  • Bot pull requests: 64
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • PTWaade (4)
  • KennethEnevoldsen (2)
  • fusaroli (1)
Pull Request Authors
  • dependabot[bot] (64)
  • KennethEnevoldsen (12)
  • PTWaade (1)
  • langner (1)
  • Vogel612 (1)
Top Labels
Issue Labels
enhancement (6) Stale (4) bug (1) documentation (1)
Pull Request Labels
dependencies (64) github_actions (33) python (8)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 44 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 14
  • Total maintainers: 1
pypi.org: tomsup

An implementation of game theory of mind in a agent based framework following the implementation of Devaine, et al. (2017).

  • Versions: 14
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 44 Last month
Rankings
Dependent packages count: 10.1%
Average: 18.8%
Dependent repos count: 21.6%
Downloads: 24.7%
Maintainers (1)
Last synced: 4 months ago

Dependencies

requirements.txt pypi
  • black ==22.8.0
  • flake8 *
  • furo *
  • joblib >=1.0.1
  • matplotlib >=3.4.2
  • pandas >=1.2.4
  • pytest *
  • pytest-cov *
  • scipy >=1.6.3
  • seaborn >=0.11.1
  • sphinx *
  • sphinx-copybutton *
  • sphinxext-opengraph *
  • wasabi >=0.8.2,<0.11.0
.github/workflows/black_formatter.yml actions
  • actions/checkout v3 composite
  • psf/black stable composite
.github/workflows/documentation.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • ad-m/github-push-action v0.6.0 composite
  • sphinx-notes/pages 2.1 composite
.github/workflows/publish_to_pypi.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • pypa/gh-action-pypi-publish master composite
.github/workflows/pytest-cov-comment.yml actions
  • MishaKav/pytest-coverage-comment v1.1.42 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • schneegans/dynamic-badges-action v1.6.0 composite
.github/workflows/stale.yml actions
  • actions/stale v6 composite
.github/workflows/depandabot_automerge.yml actions
  • hmarr/auto-approve-action v3.1.0 composite
setup.py pypi