Open LBrinkmann opened 4 years ago
This is something we want to fully support in Empirica v2, on which we are currently working. Adding it to the current architecture would be difficult. Removing players from a Game is already possible with the player.exit(reason)
API, but that just send them to the exit steps and there is no way to add a player mid-game at the moment. But it's definitely something we want to support.
Concerning rules about which games players can go, we would leave that up to the experiment designer, using hooks and the API. We could maybe develop strategies around rules like you describe for reusability, but ultimately, we will leave the choice to the experimenter.
Motivation
We like to study chains, where participants can enter and leave a game in a flexible manner. We do believe there is currently no satisfying way to implement this within empiricaly natively.
Current Behaviour
Currently, games are strictly tight to a fixed set of players. A game starts when enough player is in the lobby. Afterward, no player can be added or removed from a game.
Suggested behavior
Allowing the following game flow: A player joins a batch, then sees the introduction, then plays the first round in game A, then moves to game B and plays, e.g, the third round there, then moves to yet another game ... At some point the player is sent to the exit and then leaves the batch.
Requirements
Having a more flexible concept of a game
Adding remove player hook
to remove a player from a game at the end of a round (or stage) and/or to request a new player (then game then holds until a new player for that game has been found)
Having complex game assignment rules
Alternatively one might like to add a hook, which allows suggesting a new player to a game (which can then be disapproved.)