Skip to main content

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

Project description

tomsup 👍 Theory of Mind Simulation using Python

PyPI version Code style: flake8 pip downloads python versions

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.

🔧 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 simply run

pip3 install tomsup 

You can also install it directly from github by simply running:

pip install git+https://github.com/KennethEnevoldsen/tomsup.git

or more explicitly:

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
Introduction a general introduction to the features of tomsup which follows the implementation in the paper paper_implementation.ipynb
Creating an agent an example of how you would create new agent for the package. Creating_an_agent.ipynb
Specifying internal states a short guide on how to specify internal states on a k-ToM agent specifying_internal_states.ipynb
Pscyhopy experiment An example of how one might implement tomsup in an experiment Not a notebook, but a folder, psychopy_experiment

❓ Issues and Usage Q&A

To ask questions, report issues or request features, please use the GitHub Issue Tracker.

Using this Work

License

tomsup is released under the Apache License, Version 2.0.

Citing

If you use this work please cite:

@article{enevoldsen2020tomsup,
  title={tomsup: An implementation of computational Theory of Mind in Python},
  author={Enevoldsen, Kenneth C and Waade, Peter Thestrup},
  year={2020},
  publisher={PsyArXiv}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tomsup-1.0.3.tar.gz (25.5 kB view details)

Uploaded Source

File details

Details for the file tomsup-1.0.3.tar.gz.

File metadata

  • Download URL: tomsup-1.0.3.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for tomsup-1.0.3.tar.gz
Algorithm Hash digest
SHA256 58b1a97595cbcb04bd9f64625748550c8de0dbdaa04ae1dd04c69b1a175fb6c5
MD5 f2fdd36ef016771b674e4f20830bde21
BLAKE2b-256 fb472e8b29f14a23c2d2de3bd5f6977389c19dd7ec8e9c499ed95174ffdf9a50

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page