Dropped out player doesn't move passed waitpage

111 views
Skip to first unread message

Eva Vriens

unread,
Nov 29, 2021, 9:30:06 AM11/29/21
to oTree help & discussion
Dear oTree group,

For my experiment I need to regroup participants every round. To achieve that I use wait_for_all_groups = True and regroup participants based on a scoring number, which is a random number of the player is active and 1 if inactive:

def creating_score(self):
if self.inactive:
self.score = 1
else:
self.score = random()
self.participant.vars['score'] = self.score

Participants are then sorted so that the inactive players are grouped together in the last group:

def shuffle_groups(self):
# Create groups and assign player roles

# Sort players > from player list where if inactive player has score 1
sorted_players = sorted(
self.get_players(),
key=lambda player: player.participant.vars['score']
)
group_matrix = []
ppg = Constants.players_per_group
for i in range(0, len(sorted_players), ppg):
group_matrix.append(sorted_players[i:i + ppg])
self.session.vars['group_matrix'] = group_matrix
self.set_group_matrix(group_matrix)


For inactive players the decision pages timeout at 0 seconds. I need them to still loop through the experiment, because I need the browser bots to fill in numbers that can be presented to the other participants. 

The problem is that while timeouts work for the regular pages, the dropped out players do not move passed the grouping waitpage if the browser window has been closed. Any ideas how to solve that?

Eva

Chris @ oTree

unread,
Nov 29, 2021, 9:37:42 AM11/29/21
to Eva Vriens, oTree help & discussion
Is this problem occurring on devserver or Heroku?

Sent from my phone

On Nov 29, 2021, at 6:30 AM, Eva Vriens <evav...@gmail.com> wrote:

Dear oTree group,
--
You received this message because you are subscribed to the Google Groups "oTree help & discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otree+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/otree/55ce1121-8c68-4adc-b3c9-c33d290088c5n%40googlegroups.com.

Eva Vriens

unread,
Nov 29, 2021, 9:39:54 AM11/29/21
to oTree help & discussion
It happens on both. On Heroku it only works if I manually open tabs of players that dropped out.

Op maandag 29 november 2021 om 15:37:42 UTC+1 schreef Chris @ oTree:
Reply all
Reply to author
Forward
0 new messages