At the start of the week, run the matcher, giving it the list of people in the rotation this week, and the history of all previous matches.
people-list.txt
should look something like this. You can comment out people who are unavailable this week by adding a '#' before their name.
Salan Akorkin
Joe Dart
# Samuel Jackson
Potato Patatoe
history.txt
should look something like this:
2020-01-01 Joe Dart -> Samuel Jackson
2020-01-01 Potato Patatoe -> Joe Dart
2020-01-08 Joe Dart -> Salan Akorkin
2020-01-08 Samuel Jackson -> Potato Patatoe
Run the matcher like so:
node beverage-buddies.js people-list.txt history.txt showPairingStamped
Tadaaa... outputted in your console will be the list of pairings for the week. Let everyone know, and once it's all settled append the output to the history.txt.
Oh no, you've shared the list of pairings, but someone is away this week or a new person has joined and you've forgotten to take them into account.
Here are your options for fixing issues:
This works, but potentially requires people to reschedule meetings with different people which is unideal. Also, if the list becomes uneven, it's very likely that the first person on the people list will get a second meeting. Unfortuately, due to the design of the algorithm, this means that person uno on the list often gets a lot of extra bevvys.
Maybe you've run the matcher for the week and realized that you've organized for two people two share a bevvy who routinely share bevvys every day anyway. The algorithm will try to match each person with the person whom they've met for a bevvy least recently. By adding an entry to the history.txt for the two people who ordinarily meet frequently, you can gently encourage the algorithm to prefer different pairings.
If you don't want to rerun the matcher potentially jumble the list, you can run the matcher in "stats mode". This gives you information you can use to fix problems in the list manually.
node beverage-buddies.js people-list.txt history.txt showStats
Now, in your console you will see some information you can use to help you decide how to pair off the troublesome person. For each person you will see their "instigationRatio" which is how often they have been on the left-hand side of the arrow versus the right, and you'll see their list of "preferences" which is a sorted list of people to match them with. Pick one of the highest scoring preferences and fix up your week's pairing list. All done!