The best time to pick up oTree (to design interactive experiments) is now!

What is oTree?

oTree is an open-source framework that lets you build any interactive task that you want people to take part in, such as multiplayer games, dynamic surveys, evaluations, and tests (Chen, Schonger, and Wickens 2016). Since it is open-source and free-to-use, it has already been used in more than 600 academic publications. oTree is also backed by a vibrant online community on Google groups that also helps solve coding problems.

One important reason why many experimental researchers pick up oTree (besides that it's open-source and free) is that it strikes a nice balance between ease-of-use and flexibility. oTree uses a python-based web framework, allowing you to start with a basic framework for your experiment. Using relatively straightforward coding, you can adapt the framework to suit your needs. While it is relatively simple to implement standard design features (such as variable payoffs, input fields, and more), in theory, you can adapt the framework in any way you would like.

What is oTree Lite?

Up until recently, oTree's framework depended on Django, a particular python-based web framework. Thus, oTree was essentially a “framework inside another framework.” Django initially helped build the oTree framework, but it also comes with complexity and restrictions. Christian Peters and I have created a bunch of video tutorials on using the old framework (click here for the video list).

Recent updates to oTree (i.e., oTree version 5 and newer) have turned oTree into a self-contained framework independent of Django (referred to as oTree Lite). The primary advantage is that the new, self-contained framework is even simpler than the old framework. The new, self-contained framework also increases the compatibility of oTree with other required software and should make oTree faster to run. Christian Peters and I intend to create a new, shorter video series for the new framework soon.

What has changed in oTree Lite?

While oTree Lite is mostly backward compatible, small things have changed in the code, especially how forms and templates are rendered. For an overview of the most important changes, click here. The most useful improvement is a new but optional coding format called the __init__.py format. Rather than separating the code into two parts (i.e., models.py and pages.py), you can now use one single python file (i.e., __init__.py). This new format also unifies and simplifies the oTree syntax by getting rid of the self keyword throughout the code and allowing users to use more consistent syntax throughout their code. For more information about this new, optional format click here.

But I do not like programming!

Although these changes make it easier to program (online) interactive experiments using oTree, some researchers may still prefer point-and-click interfaces. To cater to this need, some companies and programmers have started to offer point-and-click platforms for designing interactive (online) experiments (see, for instance, Lioness Lab and Sophie labs). Yet, these platforms typically require you to pay a fee or are closed-form, which reduces your flexibility and freedom as a researcher.

Even if you dislike programming, you can still use oTree because it has a platform called oTree Studio. This platform offers a point-and-click interface for developing oTree apps. However, if your project ever requires features beyond the point-and-click interface, you can always download it from the platform and use programming to implement them.

Have you tried the new oTree yet? Let us know what you think!

References

Chen, D. L., Schonger, M., Wickens, C. 2016. oTree - An open-source platform for laboratory, online and field experiments. Journal of Behavioral and Experimental Finance, 9: 88-97.

How to reference this online article?

Van Pelt, V. F. J. (2021, March 25). The best time to pick up oTree (to design interactive experiments) is now!, Accounting Experiments, Available at: otree programming experiments design
Avatar
Victor van Pelt
Assistant Professor of Management Accounting

Related