Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing Player to be removed and added to a game #91

Open
LBrinkmann opened this issue Feb 24, 2020 · 1 comment
Open

Allowing Player to be removed and added to a game #91

LBrinkmann opened this issue Feb 24, 2020 · 1 comment

Comments

@LBrinkmann
Copy link

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

  • allowing a player to leave a game and another player to join a game
  • seperation of the introduction and exit from the actual game (e.g. the introduction is shown, when a player enters a batch, the exit pages are shown when she is leaving the batch)
  • allowing a player to play multiple games in the same batch (but potentially not two with the same factor, or only games with the same factor)

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

  • disallow player playing twice in the same game
  • disallow player playing in two games with the same factor
  • each game has a priority with which a new player assigned

Alternatively one might like to add a hook, which allows suggesting a new player to a game (which can then be disapproved.)

@npaton
Copy link
Contributor

npaton commented Feb 29, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants