← All challenges

Online Dating Services

March 2017

business-rulesmatching

An online dating service wants a rules engine to help match its members. Each profile records a name, gender, city, age, a list of interests, an acceptable age range for matches, acceptable genders, and a minimum number of shared interests required.

Two people are a potential match only if, for both of them: the other’s gender is acceptable, the other’s age falls in the acceptable range, the cities match exactly, and the other’s interests overlap by at least the minimum required. Among valid matches, higher scores go to smaller age gaps and more shared interests.

Example: Jane (26, Seattle, interests: skydiving, knitting, reading) wants a man aged 28–32 sharing at least one interest. Jim (29, Seattle, interests: skydiving, soccer, knitting) wants a woman aged 24–29 sharing at least two interests. Build a decision model that determines whether they match, and produces a score if so.

Send your solutions to DecisionManagementCommunity@gmail.com, or open a pull request to add yours here.

Solutions