oTree Forum >

Passing grouping to subsequent apps

#1 by Shu

Hi all,

I am designing an experiment which includes multiple apps (as below). I want to group participants into pairs based on their arrival time once they consent to participate in the experiment. Each participants should remain with the same groupmate throughout the entire experiment. However, with the code below, in the ice break app, participants are correctly grouped in pairs based on their arrival time on ice break app, but in the Practice and Game apps, they are regrouped based on their arrival time in the Consent app, which leads to inconsistent groupings across the apps. How can I modify the code to pass the grouping from the ice break app to the subsequent apps?

the first app is consent with: 
players_per_group = None
num_rounds = 1

the second app is Ice Break with: 
players_per_group = 2 
num_rounds = 1
class wait_group(WaitPage):
group_by_arrival_time = True

the third app is the practice with: 
players_per_group = 2
num_rounds = 2

the forth app is the game with:
players_per_group = 2
num_rounds = 10

Many thanks for your help in advance!

#2 by Chris_oTree

See gbat_keep_same_groups in otree-snippets

#3 by Shu

Hi Chris,

Many thanks for your quick response.

I have explored the gbat_keep_same_groups in otree-snippets and wanted to clarigy whether the first page in gbat_keep_same_groups_part2 must be a wait page?

In my case, part 2 is the practice app where participants can work independently. They do not need to wait for their groupmates to start the practice simultaneously. Each participant can proceed through the instruction page and complete two rounds of practice games at their own pace once they understand the rules.

Additionally, after the practice session, participants are randomly assigned to different treatment conditions—either working individually or with their groupmate. For those assigned to work individually, they don’t need to wait for their groupmate to begin the formal game session. However, they might still need to collaborate on other tasks after the formal game. Therefore, it’s important for participants to remain in the same group, with the same group id and id_in_group, throughout the entire experiment.

Given that participants in my experiment don't need to wait for their groupmate during the practice or formal game(for the work individual condition), how can I ensure that participants remain in the same group, with the same id_in_group and same group id, without a wait page as the first page in practice app?

Thank you very much for your help!

Write a reply

Set forum username