Optimizing Connections at Meetups

Meetups at Automattic

Automattic has been a globally distributed company from the start. A few times each year, we come together for a meetup to align on team strategy and to forge stronger relationships. We’ve found that organized dinner groups are a great way to facilitate connections and meet new people from various teams.

Creating meetup dinner groups turned out to be an interesting optimization problem. The task is to create a schedule such that no two people meet more than once and eat at the same restaurant. At the 2023 Data+ Meetup, my hack group and I created Dinnermattic: an internal tool that helps people create dinner groups for their meetups. Here’s how we did it!

Dinner groups at our 2022 Data+ meetup in Madrid, Spain.

Finding an optimal solution

The dinner group problem can be expressed as the social golfer problem: schedule g groups of size s using k golfers over w weeks. Each golfer must play once a week and never play with the same person more than once.

This combinatorial design problem is challenging because of the large search space: there are a total of w! x g! x s! x k! schedule combinations! Finding an optimal solution is possible, but it often takes a lot of time and memory. Google OR Tools is often the go-to solver used by many in this field. We implemented the optimal solution solver in a Jupyter notebook and it works well, but it can take over 60s to find a solution. Instead of finding the proven optimal solution, we would be happy with getting a near-optimal solution in a fraction of the time. Many researchers have used genetic algorithms as a practical way of finding good-enough solutions in very fast time.

Genetic algorithms

The genetic algorithm is a method for solving optimization problems by mimicking biological evolution. 

The algorithm goes as follows:

  1. Start with a random permutation.
  2. Score each option and filter for the top choices (parents).
  3. Create new permutations (generations) by crossing over and mutating the top choices.
  4. Score the next generation.
  5. Check if it is a feasible solution. If so, end. Else, return to step 2.

We implemented the near-optimal solution using a genetic solver and can now get really good solutions in less than a second. What makes genetic solvers so powerful is that they can be applied to many optimization problems, and allow for custom scoring, selection, and crossover depending on the application.

For example, the Dinnermattic genetic solver uses the sum of squared pairwise weights to score a permutation. This scoring technique discourages the same set of people from being assigned to dinners with the same people more than once. If the solver assigns dinners with the same people, it’s better to spread out the conflicts rather than concentrate them.

Creating a UI

Once we created our solver, we built a basic UI for meetup planners to use.

The UI allows one to add restaurant names, people, and constraints:

  • Number of groups
  • Number of people per group
  • Number of dinner group days
  • Groupings that are never allowed (comma separated list)
  • Groupings that should be discouraged

The never allowed groupings enable dietary and allergy constraints to be considered in the solver. And the discouraged groupings allow us to reduce the chances of getting assigned to a dinner group from a member of their team. We want dinner groups to encourage conversations across the company!

More connections, less money

The 2023 Data+ meetup in Porto, Portugal!

Creating a dinner group solver has the potential to save people time and money at meetups!

  • Booking an entire restaurant is very expensive compared to making reservations for 6 or less.
  • Parties of 7+ usually charge a mandatory 18%+ gratuity.
  • Smaller dinner groups are easier to transport.
  • Finding an initial dinner group solution is typically a time consuming, manual process.

We presented Dinnermattic at the Data+ meetup and won the informal awards: “most likely to be used by non datums” and “best hack project to be a data.blog post.” 🏆 🎉

Embracing connection

My hack group, enjoying a meal together!

Dinnermattic is a reflection of Automattic’s commitment to building meaningful connections and tools that bring people together. Meetups are an essential piece to the distributed work puzzle. Just like a dinner group, my hack group and I had a great time tackling this interesting optimization problem together. Thank you for learning about Dinnermattic.

Bon appétit, and happy dinner groups!

Huge shoutout to my hack group buddies. It was an absolute blast bringing Dinnermattic to life with you all! Madison S.B., Morgan S., Nhi V., Roman U., Thiago L.

Leave a Reply