Skip to content

Commit

Permalink
Version Packages (#584)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Oct 20, 2024
1 parent 728f18e commit 152f8e3
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 70 deletions.
59 changes: 0 additions & 59 deletions .changeset/assignment-alternatives.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/upgrade-moddwatch.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/upgrade-tajriba.md

This file was deleted.

65 changes: 65 additions & 0 deletions lib/@empirica/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,70 @@
# @empirica/core

## 1.12.0

### Minor Changes

- d99bca1: Add `preferUnderassignedGames` and `neverOverbookGames` assignment options.

The default player assignement algorithm assigns randomly to all games in the
first batch that still has game that haven't started. This algorithm will
notably "overbook" games, meaning that it will assign more players than the
game can handle. This is useful to ensure that games start quickly, while
maintaining good randomization. When the game starts, the players that are not
ready yet (because they are still in the intro steps) are automatically
reassigned to other games, with the same treamtent, if available.

However, in some cases, you may want to avoid overbooking games, or prefer to
assign players to games that are underassigned. This is now possible with the
`preferUnderassignedGames` and `neverOverbookGames` options.

The `preferUnderassignedGames` option will try to assign players to games that
are underassigned, before assigning to games that are already full, resuming
the assignment process as usual if no underassigned games are available, in the
current batch (this option does not try to prefer games that are underassigned
across batches).

The `neverOverbookGames` option will never assign players to games that are
already full. This will push players into the next batches, if no games are
available in the current batch. If no games are available in the next batches,
the player will be sent to exit. This option is a bit more strict than
`preferUnderassignedGames` and it can result in longer waiting times for
players, and potentially game that never start if a player never finishes the
intro steps.

Given the radical nature of the `neverOverbookGames` option, it is recommended
to use `preferUnderassignedGames` option if you do not want the normal behavior
of the assignment algorithm. If you use a single batch,
`preferUnderassignedGames` should fill optimally.

Note that `neverOverbookGames` takes precedence over `preferUnderassignedGames`,
meaning that if both options are set to `true`, `preferUnderassignedGames` will
be ignored.

To apply these options, in `server/src/index.js`, you can add the following
options to the `Classic` function:

```js
ctx.register(
Classic({
preferUnderassignedGames: true,
})
);
```

```js
ctx.register(
Classic({
neverOverbookGames: true,
})
);
```

### Patch Changes

- 97a5bd3: Upgrade moddwatch to 0.1.0 to fix a macOS warning message.
- 728f18e: Upgrade to `tajriba` tp version `1.7.2` to fix a concurrent map write issue.

## 1.11.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion lib/@empirica/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@empirica/core",
"version": "1.11.6",
"version": "1.12.0",
"description": "Empirica Core",
"author": "Nicolas Paton <nicolas.paton@gmail.com>",
"license": "Apache-2.0",
Expand Down

0 comments on commit 152f8e3

Please sign in to comment.