fredbenenson/lunch-roulette

Built-in example is broken

Closed this issue · 4 comments

danvk commented

From a fresh clone:

$ ruby lib/lunch_roulette.rb -v data/staff.csv
Generating  sets...
Invalid Sets: 1000
Valid Sets: 0
No valid sets generated, sorry.
tonyp commented

I can confirm this issue

Same issue.

Steps to reproduce:

  1. Clone the repo
  2. cd into lunch-roulette
  3. run ruby lib/lunch_roulette.rb data/staff.csv

Expected:
Some groups of people to attend lunch together.

Actual:
No valid sets generated, sorry.

Apologies all – this should have a test associated with it. It looks like the changes in #5 lead to the default set generating some groups with a 0.0 score so it's failing on the valid comparison.

The quick workaround is to change min_group_score to 0.0 in config/mappings_and_weights.yml: https://github.com/fredbenenson/lunch-roulette/blob/master/config/mappings_and_weights.yml#L25

I have to look into how to tweak the default staff file so that doesn't happen, @jeffjeffjeffrey might have some suggestions.

This should be fixed – it turns out the staff file is so old that the time_decay_constant of 80 was making the numbers too small. I turned it down to 5 for the default example. This should be fixed!