Skip to content
Simple illustration of perfect stranger matching
Python HTML
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
media
perfect_stranger
.gitignore
LICENSE
Pipfile
Pipfile.lock
README.md

README.md

oTree Perfect Stranger Matching Example

The puropose of this oTree program is to illustrate a simple implementation of perfect stranger matching, or round robin matching.

Playing the Game

Matching Implementation

The code for implementing the perfect stranger matching is located in the Sessions.creating_session function in the models.py file. Comments and links to further resources have been added to clarify any parts of the code that might be opaque to those unfamiliar with python programming.

Installation

git clone https://github.com/cesslab/otree-perfect-stranger-matching

See An Introduction to Git and GitHub, by Brian Yu if you are unfamiliar with git or github.

In the project directory run the pipenv install command to install all the project dependencies. Pipenv is used to provide a virtual environment for managing python project dependencies (see this tutorial for more information).

pipenv install

Usage

The oTree program can be played by executing the otree devserver command in the perfect_stranger directory. You can also play through the example game to see a table containing all the pairings across all rounds. Each player will have their group in the current round highlighted in the table, as show below.

Perfect Stranger Matching Image

License

See oTree License

You can’t perform that action at this time.