#1 by Xinghua (edited )
Dear all, I want to include in my study a rule follwing task, which has been used in Kimbrough and Vostroknutov (2016). It works in the following way. A participant needs to pass four crossroads. He is told to pass a crossroad only when the traffic light there is green. But he needs to pay if he waits for the light. Whenever he arrives at one crossroad, the traffic light will turn red and it will turn green agin 10 seconds later. He can decide how long to wait there. I am not sure someone has designed such a task using Otree. If you know a shared code, please let me know. Thanks.
#2 by clintmckenna (edited )
Hello! Not sure if you solved this, but it sounded interesting and I attempted creating the task. Feel free to ask if you want it changed in any way. Here is the code, might be messy in some spots: https://github.com/clintmckenna/oTree-TrafficLight Oh, for some reason in the custom data export, the "page submit" event is logged twice. I will try to figure out why when I have time.