oTree Forum >

Assign two players to the same group by group id

#1 by Bochen

Hi all,

If I want the group to shuffle as I want, is using "set_group_matrix()" the only way to do it?

For example, I want participants with id 2 and 3 to be in the group with id 3, can I set player.group.id_in_subsession = 3 if player.id_in_subsession = 2 or 3 to let these two certain participants in a certain group? I tried to do this under def creating_session, but which two players in the same group have been decided at the beginning by default(participants with id 1 and 2 are always in the same group, participants with id 3 and 4 as well, etc.) that are not from my assignment, but the group ID does change according to the latter player's group id which is assigned by me(in this case both participants with id 1 and 2 are in group 3). 

Because I have to replicate the match structure of the experiment conducted before, and getting data of participants being in which group in each round is easier than that of groups having which two participants in each round from the data file, I am trying to find another way to set match structure. Do you have any idea how to realize it? Thanks in advance!


Write a reply

Set forum username