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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tomsup-1.0.2.tar.gz
.
File metadata
- Download URL: tomsup-1.0.2.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.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31c0ac9caf23d338739f8952d01263eaaf0a672b4b3316aba115140d37ee1f1d |
|
MD5 | 8c93da07e9a6d03bacb75cb3b5d0db47 |
|
BLAKE2b-256 | 3eda7bd109687af9c8fcd89887ca230be3d88b9a2d165c566c941a78fd1c3993 |
File details
Details for the file tomsup-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: tomsup-1.0.2-py3-none-any.whl
- Upload date:
- Size: 25.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6426c3d596244f422e67da33e5bca4cb19f21f40bcf1245c300bbac4edefa4b2 |
|
MD5 | 581a0c9adf37e20d991a76050a3d60e3 |
|
BLAKE2b-256 | da398d92600bcf2d78b99df3f4e703bcf469c2a49f0ade9a1d62025e33155a4b |